Difficulties utilizing tokens provided by Auth0 windowslive social connection to access Graph API

xdyer 1 Reputation point
2021-10-15T15:57:13.187+00:00

Hello,

I am attempting to access the Graph API utilizing the on-behalf-of authorization flow in my ASP.net application. Users of my application authorize using an Auth0 windowslive social connection. When users create their account using windowslive credentials the access token provided by Auth0 works fine to create a ConfidentialClientApplication and GraphClient and call the Graph API on behalf of my users.

However when users sign-up to use my application through Auth0 using some other credentials (native, google, etc.) and later link their windowslive account, the access token provided by Auth0 for Microsoft does not work to call the Graph API. I then tried to request a new access token by calling the https://login.microsoftonline.com/common/oauth2/v2.0/token endpoint, utilizing the refresh Token provided by Auth0 only to receive a 401 Unauthorized error.

I have reached out to Auth0 support and they responded that all tokens are simply forwarded from Microsoft upon authentication. Has anyone else encountered this error or have advice on how to continue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,581 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,459 questions
{count} votes