I see this commonly when you go back to your app and add additional permissions AFTER a user has already logged in and consented to your app. That user continues to get the "old" permissions, but new users would get the new set.
If my guess is right, then you probably originally registered the app with just Directory.Read.All
and User.Read
. You logged in with your user account. You then went and added additional permissions and tried again. Does that sound right?
The problem is that Azure's v1 endpoints don't dynamically update the scopes for users that have already consented. You need to force a "re-consent" experience for these users. Add a prompt=consent
parameter to your authorize URL. That should cause the user to see the consent screen again with the updated list of permissions.
/servicePrincipals
, then check/servicePrincipals/object-id/oauth2PermissionGrants
. This will tell you which delegated permissions have been authorized for the app. – juunashttps://graph.windows.net/myazuread.onmicrosoft.com/servicePrincipals
, and then hit Go. And by the way, this explorer is for Azure AD Graph API, not Microsoft Graph API. Different APIs. But the point here is to check permission grants for your app in Azure AD. – juunasoauth2PermissionGrants
but onlyoauth2Permissions
however it doesn't display any scope in the json, only admin and user consent description displaying a very vague discription of"adminConsentDescription": "Allow the application to access AppName on behalf of the signed-in user."
– yfan183https://graph.windows.net/myazuread.onmicrosoft.com/servicePrincipals/service-principal-object-id/oauth2PermissionGrants
. Just grab the objectId of the service principal and replace service-principal-object-id with it. These grants are a navigation property and are not visible there on the principal itself. – juunas