0
votes

I'm trying to Oauth into Office 365's Unified API to read users Calendar information.
I have created a web application/web API in Microsoft Azure Portal and I believe that I have configured everything correctly. I have invoked the below request to get an authorization code:

https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=4795e078-8b61-4fa4-b6e5-8ca70278495b&redirect_uri=http://www.proxym-it.com&resource=https:%2f%2foutlook.office365.com%2f&state=5fdfd60b-8457-4536-b20f-acb658d19460

I have accepted the authorisations to give access the application to the specified resources, But I'm getting this response:

http:// www.proxym-it.com/?error=server_error&error_description=AADSTS90092: Non-retryable error has occurred.
Trace ID: de10c24b-fecf-46c0-bcb8-18fa8f208360Correlation ID: a5534f3b-9154-41db-99f6-9f4c25bf2acbTimestamp: 2015-06-19 08:57:41Z&state=5fdfd60b-8457-4536-b20f-acb658d19460

Any suggestions? Please Advise.

1

1 Answers

0
votes

Please try setting the resource to be https://graph.microsoft.com/ in your request if you are using the Unified API. For the unified API, all your calls should go to this resource and endpoint, and not to the underlying workloads like O365 Outlook or O365 SharePoint. The unified API abstracts away those silos.

You might also want to check out some of the samples we have on github. Search for "unified" on this code samples index page: https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples

Hope this helps