claude-code - 💡(How to fix) Fix [BUG] M365 connector fails with AADSTS50076 when tenant requires MFA via Conditional Access [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48000Fetched 2026-04-15 06:36:13
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

  • #33028 — AADSTS9000411 duplicate prompt parameter (different error, same connector)
  • #37969 — M365 connector ofid_ errors (different error, same connector) Not get an error and get the result of my mcp request.

Error Messages/Logs

Root Cause

The Microsoft 365 MCP connector fails on every Graph API call with AADSTS50076 (MFA required) when the tenant has a Conditional Access policy requiring MFA for Microsoft Graph access.
The connector's OAuth flow does not trigger an MFA challenge during interactive authentication, so the token issued to the MCP server never contains the mfa claim in its amr array. When the MCP server performs the On-Behalf-Of (OBO) exchange against Graph (00000003-0000-0000-c000-000000000000), Entra rejects it because the originating token lacks the MFA claim.

Code Example

AADSTS50076: Due to a configuration change made by your administrator, or because you moved
  to a new location, you must use multi-factor authentication to access
  '0000000x-0000-0000-x000-000000000000'.

  clientId: api://xxxxx
  tenantId: xxxxx
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Microsoft 365 MCP connector fails on every Graph API call with AADSTS50076 (MFA required) when the tenant has a Conditional Access policy requiring MFA for Microsoft Graph access.
The connector's OAuth flow does not trigger an MFA challenge during interactive authentication, so the token issued to the MCP server never contains the mfa claim in its amr array. When the MCP server performs the On-Behalf-Of (OBO) exchange against Graph (00000003-0000-0000-c000-000000000000), Entra rejects it because the originating token lacks the MFA claim.

I was likely the first user in my tenant to connect to the M365 connector, and I may have done so before the Conditional Access MFA policy was applied to the Claude enterprise apps. Other users on the same tenant with the same CA policy connect and use the connector without issues — only my account is affected. This suggests my account may be stuck with a stale token or grant chain that was originally issued without the MFA claim, and no amount of reconnecting or token revocation on the Entra side clears whatever state the MCP server has cached for my user.

What I've tried (none worked)

  • Disconnecting and reconnecting the connector multiple times (~50+ attempts)
  • Full sign-out from login.microsoftonline.com + cookie clear + incognito reconnect
  • IT revoked all refresh tokens for my account via Entra, then reconnected
  • Re-authenticating via /mcp in Claude Code
  • All other users on the same tenant work fine — issue is isolated to my account

What does work

  • Excluding my user from the MFA Conditional Access policy — connector works immediately
  • Re-adding me to the MFA policy immediately breaks it again

Suspected Root Cause

I connected to the M365 connector before my tenant's CA policy required MFA for the Claude enterprise apps. The MCP server likely cached an OBO refresh token or grant for my user that was issued without the mfa claim. Even after:

  • Revoking sessions on the Entra side
  • Disconnecting/reconnecting the connector on the Claude side

...the MCP server appears to retain or reissue tokens from the original pre-MFA grant chain. Since other users who connected after the CA policy was active work fine, the issue seems to be stale server-side state for my specific user.

If the MCP server does not already do so, including amr_values=mfa or a claims parameter like {"access_token": {"acr": {"values": ["possessionorinherence"]}}} in the authorization request would force Entra to trigger MFA during interactive auth, preventing this class of issue entirely.

Environment

Related Issues

  • #33028 — AADSTS9000411 duplicate prompt parameter (different error, same connector)
  • #37969 — M365 connector ofid_ errors (different error, same connector)
  • #31089 — M365 MCP OAuth failure

What Should Happen?

Not get an error and get the result of my mcp request.

Error Messages/Logs

AADSTS50076: Due to a configuration change made by your administrator, or because you moved
  to a new location, you must use multi-factor authentication to access
  '0000000x-0000-0000-x000-000000000000'.

  clientId: api://xxxxx
  tenantId: xxxxx

Steps to Reproduce

  1. Have a tenant with a Conditional Access policy requiring MFA for Microsoft Graph (or All cloud apps)
  2. Connect the Microsoft 365 connector in claude.ai
  3. Use any M365 tool (e.g., outlook_email_search)

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by including amr_values=mfa or a claims parameter in the authorization request to force Entra to trigger MFA during interactive authentication.

Guidance

  • The suspected root cause is a stale server-side state for the specific user, caused by connecting to the M365 connector before the CA policy required MFA for the Claude enterprise apps.
  • To verify, try excluding the user from the MFA Conditional Access policy and re-adding them to see if the issue persists.
  • The MCP server may be retaining or reissuing tokens from the original pre-MFA grant chain, so including amr_values=mfa in the authorization request could force Entra to trigger MFA and prevent this issue.
  • Another possible solution is to use a claims parameter like {"access_token": {"acr": {"values": ["possessionorinherence"]}}} in the authorization request.

Example

No code snippet is provided as it is not explicitly mentioned in the issue, but the authorization request could be modified to include the suggested parameters.

Notes

The issue seems to be isolated to the specific user and tenant, and other users on the same tenant with the same CA policy are not affected. The MCP server's behavior and caching mechanism are not fully understood and may require further investigation.

Recommendation

Apply a workaround by including amr_values=mfa or a claims parameter in the authorization request, as this is the most likely solution to resolve the issue. This will force Entra to trigger MFA during interactive authentication and prevent the stale server-side state issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING