Monday, March 25, 2019

How to get a graph API token in Postman tool

1) Open postman native application from desktop
2) Go to authorization tab
3) Click "Get new access token"

4) Fill the following properties

Auth URL :  

https://login.microsoft.com/(Tenant ID)/oauth2/v2.0/authorize

Access Token URL :

https://login.microsoft.com/(Tenant ID)/oauth2/v2.0/token

Scope: 

https://graph.microsoft.com/.default

Grant Type:

Client Credentials





5) Click Request token

6) You will receive the token under the existing token



7) Select Add token to header as shown in above image and click use token

8) You are ready to run graph APIs from postman


How to get Tenant ID?
1) Get your Tenant ID from Azure AD. Choose Properties - your Tenant ID is the Directory ID

How to get Client ID?
1)  You have to register your app in Azure. https://docs.microsoft.com/en-us/graph/auth-v2-service#4-get-an-access-token

How to get Secret key?
2) You have to register your app in Azure https://docs.microsoft.com/en-us/graph/auth-v2-service#4-get-an-access-token