Exchanging Access Tokens for two Azure Apps for Graph APIs

Shubhanshu Dixit 0 Reputation points
2026-05-18T10:55:09.28+00:00

I have two Azure App Registrations: AppID1 and AppID2.

I already have a pair of access/refresh tokens for AppID1.

Is there any way to use the access token or refresh token from AppID1 to obtain an access token or refresh token for AppID2 without asking the user to sign in again on our backend service?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-05-18T10:55:25.2+00:00

    No. An access token or refresh token issued for AppID1 cannot be exchanged to obtain tokens for AppID2.

    Key points:

    1. Tokens are bound to a client (app registration)
      • In the authorization code flow, the token endpoint issues an access token and (optionally) a refresh token to a specific client_id (the app registration).
      • The refresh token returned in Step 2 is explicitly tied to the app that requested it and to the scopes that were consented for that app.
      • When using a refresh token, the app must call the /token endpoint again with its own client_id and client_secret (for confidential clients) and grant_type=refresh_token.
      • A refresh token acquired by AppID1 cannot be presented as if it belonged to AppID2.
    2. Supported use of refresh tokens
      • The documented pattern is:
        • Step 2: App uses the authorization code to request an access token and (optionally) a refresh token.
        • Step 4: The same app later calls /token with grant_type=refresh_token and its own client_id to get a new access token (and a new refresh token) for the same app.
      • The documentation does not describe any flow where a refresh token from one client can be used to obtain tokens for a different client.
    3. Required pattern for multiple apps
      • If both AppID1 and AppID2 need delegated access on behalf of the same user, each app must obtain its own authorization code and tokens via an interactive sign-in at least once.
      • In production, this is typically handled by using a single client app (or a shared backend) with appropriate scopes, or by using a Microsoft Authentication Library (MSAL) and a single app registration where possible, rather than trying to exchange tokens between separate app registrations.
    4. Recommended approach
      • Use MSAL or another supported authentication library to manage tokens and Single Sign-On (SSO) for the user across your components, instead of attempting token exchange between app registrations.
      • If a backend service needs to call Microsoft Graph on behalf of the user, design the architecture so that the same app registration (client) is used for the delegated flow, or use on-behalf-of flow within a single logical application rather than between unrelated app registrations.

    There is no supported mechanism in the Microsoft identity platform to take an access or refresh token issued to AppID1 and exchange it for tokens for AppID2 without a user sign-in/consent flow for AppID2.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.