How to use Postman to call Azure AD B2C protected function?

Viewed 821

How can Postman be used to access an Azure Function with authentication turned on? After choosing Authorization > Type = OAuth 2.0, it is unclear where all of the values in the "Get new access token" screen come from.

Is this the correct method to access the protected function? Authentication has been enabled using Azure AD B2C.

1 Answers

Yes, you can use the "Get new access token" feature in postman to access the protected function.

enter image description here

Grant Type: Implicit

Callback URL: Any URL defined in your B2C app

Auth URL: https://{b2ctenant}.b2clogin.com/{b2ctenant}.onmicrosoft.com/oauth2/v2.0/authorize?p={policy}

ClientID: Application ID from your b2c app

Scope: https://{b2ctenant}.onmicrosoft.com/api/user_impersonation. You can find it under Published scopes, remember to add it in the API access list, or you will have no permission to access.

enter image description here

State: It can be empty

Client Authentication: Either one, it doesn't matter

Related