Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows 10, and Enterprise Mobility + Security.
For more information on Microsoft Graph, refer to the Microsoft Documentation.
An access token contains claims that you can use in Azure Active Directory B2C (Azure AD B2C) to identify the granted permissions to your APIs. When calling a resource server, an access token must be present in the HTTP request. An access token is denoted as access_token in the responses from Azure AD B2C.
For more information on Access Token. Refer to the Microsoft Documentation.
If you are looking for getting the Azure Access Token for Azure Resource Manager, refer to my post on How to get Azure Access Token using Postman.
- Download Postman
- Service Principal in Azure – To know how to create a service principal, go through my post on Creating Service Principal using PowerShell.
Import Postman Collection
Getting Access Token
After you create Service Principal, make a note of Tenant ID, Client ID, and Client Secret. Click on Environment Quick look in Postman.
Click on Add new Environment.
Enter Environment name and following variables: tenantId, clientId, clientSecret, resource, subscriptionId.
Give the required values based on your Azure subscription and Service Principal. Give resource as
https://graph.microsoft.com/. Scroll down and Update. You can ignore the resourceGroup and subscriptionId.
The resource varies based on what services and resources you want to authenticate to get the access token. This is specifically for Microsoft Graph API.
Select the created environment from the dropdown.
Send the Post request to get the Access Token in the response.