Using Auth0 with Microsoft Social login to call Microsoft Graph API

Hi, I tried searching through the forum but my issue still persist.

  • I login with a SPA auth0 app (using a Microsoft identity)
  • Tried to call Microsoft Graph with Auth0 token
  • Token does not work to call graph
  • I already enable Microsoft graph api on auth0

{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token validation failure. Invalid audience.",
    "innerError": {
      "date": "2024-10-03T08:20:25",
      "request-id": "7750b6b4-17a4-4c71-914b-aeeaa9718d9c",
      "client-request-id": "7750b6b4-17a4-4c71-914b-aeeaa9718d9c"
    }
  }
}

Is there up to date latest docs or anyone can help me

Hi there,

Thank you for reaching out to us!

Wanted to provide some information on this issue, as others might also find it useful.
Looking at the error, the issue might be accessing the token from the Azure Connection. This should be stored within the user identities array at this following endpoint: Auth0 Management API v2 which you can use to retrieve the Access token from.

These following documentations should also be useful for general information:

Hope this helped!
Gerald