Graph API - Insufficient privileges to complete the operation
Graph API - Insufficient privileges to complete the operation
Graph API - Insufficient privileges to complete the operation
Re: Graph API - Insufficient privileges to complete the operation
Please refer to below steps :
-
From your screenshot , seems you grant `Read and write directory data` application permission for `Windows Azure Active Directory`(azure ad graph api) . Since you are using microsoft graph ([https://graph.microsoft.com/](https://graph.microsoft.com/)) , you need to grant application permission for `Microsoft Graph` :
[](https://i.sstatic.net/3vxC1.png)
-
Since you are admin in your AAD, You could grant permission for users in organization by click `Grant permission` button shown in above screenshot .
-
Then you could use your code (client credential flow to get the token) and query users information . If you check the claims in access token issued by azure ad , you could find `Directory.Read.All` permission in `roles` claim .
-
From your screenshot , seems you grant `Read and write directory data` application permission for `Windows Azure Active Directory`(azure ad graph api) . Since you are using microsoft graph ([https://graph.microsoft.com/](https://graph.microsoft.com/)) , you need to grant application permission for `Microsoft Graph` :
[](https://i.sstatic.net/3vxC1.png)
-
Since you are admin in your AAD, You could grant permission for users in organization by click `Grant permission` button shown in above screenshot .
-
Then you could use your code (client credential flow to get the token) and query users information . If you check the claims in access token issued by azure ad , you could find `Directory.Read.All` permission in `roles` claim .