claude-code - 💡(How to fix) Fix [BUG] Microsoft 365 MCP OAuth still fails with duplicate 'prompt' parameter (AADSTS9000411) — regression of #49175 [3 comments, 2 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#52444Fetched 2026-04-24 06:07:06
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Timeline (top)
commented ×3labeled ×3closed ×1cross-referenced ×1

Code Example

...&prompt=select_account&...&prompt=consent
RAW_BUFFERClick to expand / collapse

Reopening as a new issue since #49175 is locked.

The Microsoft 365 MCP server (https://microsoft365.mcp.claude.com/mcp) still generates an authorization URL containing two prompt parameters, which Azure AD rejects:

...&prompt=select_account&...&prompt=consent

Azure response:

AADSTS9000411: The request is not properly formatted. The parameter 'prompt' is duplicated.

Reproduced today (2026-04-23) by calling mcp__microsoft365__authenticate. The returned URL contains both prompt=select_account (early in the query string) and prompt=consent (at the end). OAuth flow cannot complete.

Fix: emit only one prompt value.

Ref: #49175

extent analysis

TL;DR

Remove the duplicate prompt parameter from the authorization URL to fix the Azure AD rejection.

Guidance

  • Verify the current implementation of mcp__microsoft365__authenticate to identify where the duplicate prompt parameter is being added.
  • Check if there's a configuration option to set the prompt parameter only once, ensuring it's either select_account or consent, but not both.
  • Consider modifying the code to prioritize one prompt value over the other, or to remove the duplicate parameter before sending the request to Azure AD.
  • Test the updated implementation to ensure the OAuth flow completes successfully.

Example

No code snippet is provided as the issue doesn't contain specific implementation details.

Notes

The fix relies on modifying the mcp__microsoft365__authenticate function or the underlying configuration to remove the duplicate prompt parameter.

Recommendation

Apply workaround: modify the mcp__microsoft365__authenticate function to emit only one prompt value, as this is a specific and targeted fix for the identified 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