Authorization_RequestDenied:Insufficient privileges to complete the operation.

Durjan Hussain 155 Reputation points
2024-05-15T15:47:33.7933333+00:00

Hi there,

I am experiencing issues with Graph API permissions, even though I've granted all the necessary permissions and consents.

Interestingly,the same app works in some tenants and but not in others.

This is an old app that's why it's Windows Active Directory Permissions

Please see the screenshots.

@Tay Jorge

User's image

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,983 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 38,356 Reputation points
    2024-05-16T02:02:06.1733333+00:00

    Hi @Durjan Hussain

    Permissions for Azure AD Graph API cannot be applied to MS Graph API, you must grant the corresponding permissions for the calling app under MS Graph API.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


  2. Durjan Hussain 155 Reputation points
    2024-05-21T08:03:45.2666667+00:00

    Hi @CarlZhao-MSFT,

    It was "wids" value which you can see above in both JTW tokens are different.

    Assigning a "Directory Reader" role to the app resolve the issue.

    https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#directory-readers

    https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/manage-roles-portal#assign-a-role

    It's all been sorted now.

    Thank you very much for you help.