I am trying to sign in to azure / get a token for with policy id by postman

Andrew Shlykov 20 Reputation points
2024-09-10T19:53:34.44+00:00

I am trying to sign in to azure with custom policy / policy work fine when fo the application but does not work for postman

It logins fine when I am using the client endpoint

https://login.microsoftonline.com/XXXXXXXXXXXXXX/oauth2/v2.0/token but fails for

https://XXXXXXXXXX.b2clogin.com/XXXXXXXXXX.onmicrosoft.com/<policy-name>/oauth2/v2.0/token

importunely the policy defines all the needed claims

policy is taken form custom policy xml PolicyId="XXXXXXXXX"

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,755 questions
{count} votes

Accepted answer
  1. Raja Pothuraju 6,440 Reputation points Microsoft Vendor
    2024-09-27T17:15:03.17+00:00

    Hello @Andrew Shlykov,Thank you for your time during the Teams call.

    As we discussed and troubleshooted, we were able to identify the cause of the issue in your environment. The issue occurred because the app registration was created with the support type set to "Accounts in this organizational directory only (tenant B2C only - Single tenant)." To authenticate users in B2C using user flows, the application must be created with the support type "Accounts in any identity provider or organizational directory (for authenticating users with user flows)." After making this change, you were able to generate the access token successfully.

    Please refer to the sample screenshot below for reference.User's image

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

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

    Thanks,
    Raja Pothuraju.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.