[BUG] microsoft365 MCP: OAuth flow fails with two distinct errors
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?
The Microsoft 365 MCP server (https://microsoft365.mcp.claude.com/mcp) authentication
flow is broken. Calling mcp__microsoft365__authenticate produces a URL with two separate
issues that prevent login from completing.
What Should Happen?
The OAuth flow completes successfully and the Microsoft 365 MCP tools become available in Claude Code.
Error Messages/Logs
Steps to Reproduce
Add the microsoft365 MCP server to Claude Code.
- Invoke the authentication tool (
mcp__microsoft365__authenticate). - Open the generated authorization URL in a browser.
## Issue 1 — Duplicate prompt parameter
The generated URL contains prompt twice:
?prompt=select_account&...&prompt=consent
Microsoft's identity platform rejects this with:
AADSTS9000411: The request is not properly formatted.
The parameter 'prompt' is duplicated.
Workaround attempted: Manually removed the first prompt=select_account from the URL
and retried.
## Issue 2 — Unregistered redirect_uri
After fixing Issue 1 manually, login proceeds but fails at redirect with:
AADSTS900971: No reply address provided.
The generated redirect_uri uses a dynamic localhost port
(e.g. http://localhost:44974/callback). This URI does not appear to be registered
in the Azure AD app registration for client_id 08ad6f98-a4f8-4635-bb8d-f1a3044760f0.
For public client apps, Azure AD supports dynamic localhost ports natively
(http://localhost without a fixed port), but only if the app is registered
as a public client with that base URI.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
latest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗