Search code examples
access-tokenazure-ad-b2cazure-ad-graph-api

Use Access Token for Graph API in AAD B2C


The access token that the app receives after successful authentication, can we use the same token for invoking GRAPH APIs for /me.

I tried to use the access token that I received in POSTMAN for /me but got an invalid token error. If I explicitly generate the token in POSTMAN, I am able to use it for /me.

What am I doing wrong here?enter image description here!


Solution

  • I tested it.The access token you get after successful authentication of the app you use should be b2c, while b2c cannot be used to request a graph endpoint. See reference from Azure AD B2C auth code flow. enter image description here

    enter image description here You can successfully request /me endpoint with the explicitly generated access token in POSTMAN because you are using an access token from Azure AD auth code flow.