[BUG] microsoft365 MCP server auth fails with AADSTS9000411 — duplicate prompt parameter

Resolved 💬 3 comments Opened Mar 11, 2026 by freddyporges-lgtm Closed Mar 14, 2026

Preflight Checklist

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

What's Wrong?

Description:

Attempting to authenticate the microsoft365 MCP server (https://microsoft365.mcp.claude.com/mcp) fails with the following Microsoft error:

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

Root cause:

The server's OAuth authorization server metadata (/.well-known/oauth-authorization-server) hardcodes ?prompt=select_account directly in the authorization_endpoint field:

"authorization_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?prompt=select_account"
Claude Code's OAuth client then appends its own prompt parameter to this URL, resulting in prompt appearing twice — which Microsoft's identity platform rejects per the OAuth spec.

Steps to reproduce:

Add microsoft365 MCP server to ~/.claude.json with "type": "http" and "url": "https://microsoft365.mcp.claude.com/mcp"
Trigger auth by requesting an Outlook/M365 action in Claude Code
Browser opens to Microsoft login, auth fails immediately with AADSTS9000411
Expected behavior: Auth completes successfully and M365 tools are available in session.

Environment:

Claude Code v2.1.72
macOS 14.6
MCP server: https://microsoft365.mcp.claude.com/mcp
Fix: Remove ?prompt=select_account from the authorization_endpoint in the server's OAuth metadata. The prompt value should be passed as a separate parameter by the client, not baked into the endpoint URL.

What Should Happen?

I should be able to authenticate my m365 account to stand up an MCP integration with CC

Error Messages/Logs

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

Steps to Reproduce

Add microsoft365 MCP server to ~/.claude.json with "type": "http" and "url": "https://microsoft365.mcp.claude.com/mcp"
Trigger auth by requesting an Outlook/M365 action in Claude Code
Browser opens to Microsoft login, auth fails immediately with AADSTS9000411
Expected behavior: Auth completes successfully and M365 tools are available in session

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.72

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗