Unable to get the authorization code for the graph api from postman

Alekhya Bojja 0 Reputation points
2024-11-12T09:35:53.6066667+00:00

Hello, i am trying to generate a authorization code from postman for the microsoft entra id registered app. I have given all the correct values for the url client id, resource type, resource url, scope, redirect uri, and all but still i get response in html format and no code is generated not even a consent is generated to give the access. Anyone can help please. I have to use the code to get the access token for the building of app in mulesoft. Client credential flow is used for application permissions but mine is delegated permissions so i need authorization code only. Can someone help please

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,546 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 3,540 Reputation points Microsoft Vendor
    2024-11-12T10:01:46.04+00:00

    Hi Alekhya Bojja,

    Thank you for reaching out to Microsoft Support!

    It sounds like you're having trouble generating an authorization code for your Microsoft Entra ID registered app using Postman.

    From your description, it seems like you've set up everything correctly, but you're still getting an HTML response instead of the authorization code. Here are a few things you might want to check:

    Ensure Correct Grant Type: Make sure that the grant type is set to Authorization Code in Postman. This is crucial for delegated permissions.

    Check Redirect URI: Verify that the redirect URI you have specified in Postman matches exactly with the one registered in your Microsoft Entra ID app. Any mismatch can cause issues.

    1. Scope and Consent: Ensure that the scope you are requesting includes all the necessary permissions. Sometimes, if the scope is not correctly specified, the consent screen might not appear.

    Please refer to below documentations to configure postman correctly. Follow all the steps provided in the documentations.

    https://learn.microsoft.com/en-us/graph/use-postman

    After following the above documentation, refer to this documentation to use delegated authentication with postman.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.