1
votes

I am trying to access Microsoft Graph API using Access token of b2c login. Following are the endpoints azure portal showing. enter image description here

As I feel we must be able to call https://graph.microsoft.com endpoints according to this. Please correct me if I am wrong. Then I generated access token as follows and Tried to call https://graph.microsoft.com/v1.0/me/ using that token.

enter image description here

The result is as follows.

{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token validation failure.",
    "innerError": {
      "date": "2020-08-25T11:58:07",
      "request-id": "c6a9ba06-d41e-49f7-ba94-f75478ce89b0"
    }
  }
}

I have granted API permissions as follows in my application too enter image description here

1

1 Answers

1
votes

This wont work. Use the Azure AD flows in your AAD B2C tenant.

https://docs.microsoft.com/en-us/graph/auth-v2-service