Share via

SSO Token Fails in Outlook Desktop but Works in OWA

Diluka Hewage 96 Reputation points
2025-09-15T08:40:10.87+00:00

I am developing an Outlook add-in that uses SSO authentication. The add-in acquires the token using office.auth.getAccessToken(), then sends that token to the add-in backend where it is validated against Microsoft Graph.

One of our customers reported an issue where the add-in works fine in OWA, but fails in Outlook Desktop with an error as follows.
image-20250905-132807

To investigate, I created a scenario in our test environment to reproduce this behavior. Here’s what I observed:

  1. On Outlook Desktop, the token acquired via office.auth.getAccessToken() does not include "mfa" in the amr claim.
  2. On OWA, the token does include "mfa" in the amr claim.
  3. The same behavior was confirmed when comparing tokens from the customer’s environment.

As a test, I enforced MFA for the affected user via a Conditional Access policy:

  • Applied to a specific user.
  • Resources: Office 365 and the Enterprise Application of the relevant add-in.
  • Device: any device.

After that policy was applied:

  • The user had to sign in to Outlook Desktop again with MFA.
  • The new token from Outlook Desktop then included "mfa" in the amr array, and the add-in worked as expected.
  • OWA tokens already had "mfa" even before this test scenario was created.

My questions:

  • Is the absence of "mfa" in the Outlook Desktop SSO token the actual reason why the add-in fails with MFA-related errors?
  • Why would Outlook Desktop issue a token without "mfa", while OWA includes it?
  • Is enforcing MFA through Conditional Access the correct way to guarantee consistent behavior across Desktop and OWA?

Any confirmation or explanation on this scenario would be greatly appreciated.

Microsoft 365 and Office | Development | Other
0 comments No comments

Answer accepted by question author

  1. Jack-Bu 6,770 Reputation points Microsoft External Staff Moderator
    2025-09-15T13:55:45.7433333+00:00

    Dear Diluka Hewage

    Thank you for reaching out to Microsoft Q&A forum with your questions.

    The error (AADSTS50076) occurs specifically in the Outlook Desktop client because the Single Sign-On (SSO) token acquired by the add-in lacks an "mfa" entry in its amr (Authentication Method Reference) claim. This claim is part of the token's payload and indicates the methods used for authentication (e.g., password + multifactor). Our backend validates this for security, so tokens without "mfa" are rejected.

    To Answer your inquiries:

    1. Is the absence of "mfa" in the Outlook Desktop SSO token the actual reason why the add-in fails with MFA-related errors?

    Yes, this is likely the direct cause if your backend validation logic checks for the presence of "mfa" in the amr (Authentication Method Reference) claim array within the JWT payload of the access token acquired via office.auth.getAccessToken()``.

    The amr claim is a standard OpenID Connect/JWT attribute that lists the authentication methods used to authenticate the user (e.g., ["pwd"] for password-only, or ["pwd", "mfa"] for password + multifactor authentication). Microsoft Entra ID (formerly Azure AD) includes "mfa" in amr only when an MFA challenge was satisfied during the token issuance or propagation process. If your backend uses this claim to enforce MFA compliance (e.g., rejecting tokens without it for security reasons), the absence would trigger validation failures, leading to errors like the one shown in your screenshot (AADSTS50076, which relates to MFA enforcement via configuration changes or policy triggers).

    This aligns with your reproduction: the token works when "mfa" is present (post-CA policy) but fails without it. Note that while amr is optional in some token configs, it's commonly relied upon for MFA verification in Graph API integrations, as it provides proof of authentication strength without needing separate policy checks.

    2. Why would Outlook Desktop issue a token without "mfa", while OWA includes it?

    This discrepancy stems from how the two clients handle Single Sign-On (SSO) authentication via the Primary Refresh Token (PRT) in Microsoft Entra ID, combined with differences in session management and prompt behaviors:

    • PRT and Claim Propagation: Both Outlook Desktop and OWA leverage the PRT, a device-bound refresh token issued during Entra ID device registration (e.g., on Entra-joined or hybrid-joined Windows devices), for seamless SSO. The PRT can carry an "mfa" claim if it was obtained or renewed via an MFA-authenticated flow (e.g., Windows Hello for Business or an interactive MFA prompt). When the client requests an access token (like via getAccessToken() for your add-in), Entra ID propagates the PRT's claims, including "mfa" in amr, to the resulting token. If the PRT lacks the "mfa" claim (e.g., it was issued via password-only auth or the MFA imprint has expired), the downstream token won't include it either.
    • Outlook Web App (OWA): Tokens consistently include "mfa" because web sessions trigger fresh MFA challenges more reliably.
    • Outlook Desktop: Uses cached credentials via the Primary Refresh Token (PRT) for seamless sign-ins, which may not reflect recent MFA if the session is long-lived or predates an MFA requirement.

    This leads to inconsistent behavior across clients but doesn't affect the add-in's functionality in OWA.

    3. Is enforcing MFA through Conditional Access the correct way to guarantee consistent behavior across Desktop and OWA?

    Yes, this is the recommended and most reliable approach for consistent MFA enforcement in Office add-ins and Microsoft 365 apps. CA policies in Entra ID allow granular control over authentication strength, ensuring MFA challenges occur when needed and updating the PRT accordingly for both clients.

    • Why It Works Here: Your test setup (targeting the user, Office 365 resources, and your add-in's Enterprise App, with "any device") forced an interactive re-sign-in, imprinting the "mfa" claim on the PRT. This propagates to SSO tokens in both Desktop (via WAM) and OWA (via browser SSO), resolving the inconsistency. Without this, Desktop's silent flows can bypass prompts if the PRT is still valid but lacks the claim.

    I hope I was able to clarify your concern, if you have any additional question, feel free to comment below. I be more than happy to assist.  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".      

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?


0 additional answers

Sort by: Most 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.