2
votes

We've been using Azure Active Directory and EWS SOAP web services successfully.

Trying to see if we can use our current authentication method to be able to also invoke Microsoft Graph (i.e. https://graph.microsoft.com/v1.0/me/)

I went into Azure and added Microsoft Graph under App Registrations -> Settings -> Required Permissions.

This was our authorize endpoint url:

https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2Foutlook.office365.com%2F

I changed it to :

https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2Fgraph.microsoft.com

Is this all I had to do? When I try to go through the oAuth 2.0 flow, the authorize request seems successful, then I'm asked to enter my credentials, and then I get an error:

"Misconfigured application. This could be due to one of the following: The client has not listed any permissions for 'Microsoft Graph' in the requested permissions in the client's application registration. Or, The admin has not consented in the tenant. Or, Check the application identifier in the request to ensure it matches the configured client application identifier. Please contact your admin to fix the configuration or consent on behalf of the tenant. Client app ID: b1313958-.... "

1

1 Answers

2
votes

I went into Azure and added Microsoft Graph under App Registrations -> Settings -> Required Permissions.

You mentioned this as part of your question. Please check if after performing these steps for your App Registration in Azure AD, did you click on the “Grant Permissions” button to provide consent or not.

Looking at the error it seems Consent for Microsoft Graph related permissions isn’t done yet.