question

SharmaAyushNokiaINGurgaon-5163 avatar image
0 Votes"
SharmaAyushNokiaINGurgaon-5163 asked ·

GET USER ACCESS TOKEN- POSTMAN "error": "invalid_grant"

I have configured the postman environment successfully, I am able to generate App only access token but while generating access token this is showing the subjected error! I checked credentials, client id, secret all are correct!

azure-ad-graph
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered ·

Can you please provide more details - what endpoint you are hitting, what scope you are using, whether the application is a single tenant or multi-tenant and if you are using a client credentials grant then grant_type should be set to client_credentials.
You can refer to blog to setup client credentials flow using Postman. Also, Client credentials documentation for details.


· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you, grant_type was set as password, I change it accordingly but getting "Authorization_RequestDenied" while accessing this token for MS graph [https://graph.microsoft.com/v1.0/me]

"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"date": "2020-06-13T04:05:55",
"request-id": "5ebf79fe-58e2-4a10-b79c-76ccba982ca5"
}
}

0 Votes 0 ·
SaurabhSharma-msft avatar image SaurabhSharma-msft SharmaAyushNokiaINGurgaon-5163 ·

@SharmaAyushNokiaINGurgaon-5163 Can you please make sure that you have granted an Admin consent if require for any of the Graph API permissions added to your application. (screenshot below).
10317-api-permissions.png


Also, refer to the documentation - Authentication and authorization basics for Microsoft Graph



0 Votes 0 ·
api-permissions.png (54.0 KiB)