The client application has requested access to resource 'https://outlook.office365.com'. This request has failed

user2342194 picture user2342194 · Jul 9, 2014 · Viewed 12.6k times · Source

I am trying to test the sample code from office365 API, I could login to my account but after that i would always get this exception


AuthenticationFailedException was caught

AADSTS65005: The client application has requested access to resource 'https://outlook.office365.com'. This request has failed because the client has not specified this resource in its requiredResourceAccess list.

Trace ID: 7a39b0bd-1738-418f-984a-feffae5b5d9b

Correlation ID: 16da7c7f-9f0c-468f-a560-a51b1ac9b3bf

Timestamp: 2014-07-09 07:36:34Z


This is the code that I have been testing this code is generated by the API.

Authenticator authenticator = new Authenticator(); var authInfo = await authenticator.AuthenticateAsync("https://outlook.office365.com");

please help me or point-out what I'm doing wrong, this is my first time developing in office365 please help and thank you.

Answer

theark40 picture theark40 · Jul 24, 2014

I just came across your question having run into the same error, so since nobody ever answered I figured I would post the answer I found. This error is related to the permissions set to be requested on the app in the Azure dashboard at https://manage.windowsazure.com.

If you go into your app configuration page and scroll to the bottom, you just need to add the corresponding items under the delegated permissions dropdown.