Thursday, 27 June 2024

Get Microsoft Entra ID (formerly Azure Active Directory) Client Token From Postman

Let's learn step by step How to get the AD Client Token.

Step 1: Go to Azure Portal

Step 2: Search Microsoft Entra ID and click it.

Step 3: Go to App Registrations











Step 4: Click on the application and copy TenantId, Client Id and Client Secret







Step  5: Below are the parameters we required for the postman request

Parameter        Description
Tenant Id               The (tenant) ID for the related application is registered in Microsoft Entra ID.
client_id                 The (client) ID for the related application registered in Microsoft Entra ID.
client_secret           Client secret value for the related application registered in Microsoft Entra ID.
grant_type              client_credentials
scope                      https://graph.microsoft.com/.default 


Step 6: Add a new Post request in the Postman with the below URL and above parameters, you will get token as shown in the snapshot below.

https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token


























Here you can see the token.

No comments:

Post a Comment

Implement Authorization in Swagger with Static Value in Header .Net 8

If you want an anonymous user should not run the APIs. To run your API Endpoints From Swagger / Postman / Code the user should pass the head...