UPDATE: This was VPN/network gating on our own Enterprise AS, not a Copilot Studio bug. It was confirmed by making it reachable and getting a full successful flow through, including a real tool call.
MCP tool "Dynamic Discovery" OAuth crashes with internal server error — never queries the authorization server
I'm connecting a Copilot Studio agent to a custom MCP server, added via Tools → Add a tool → Model Context Protocol (URL only, no manual auth config — the built-in auto-discovery path). The MCP server requires OAuth; sign-in should happen automatically via RFC 9728 protected-resource metadata + RFC 8414 authorization-server discovery.
Symptom: When the agent tries to invoke the tool, it prompts the connection flow, then fails with:
Encountered internal server error. The correlation Id is '
<your correlation ID>'.
What I've verified with server-side logs on both ends:
- Copilot Studio calls
GET /mcpon my server → gets401with aWWW-Authenticateheader pointing to/.well-known/oauth-protected-resource/mcp(per RFC 9728). Confirmed in my server's access logs. - Copilot Studio then fetches
/.well-known/oauth-protected-resource/mcp→ gets a200with valid JSON, including anauthorization_serversentry pointing to my authorization server. Confirmed in my server's access logs. - That authorization server's own
/.well-known/oauth-authorization-serverdocument is independently confirmed reachable and spec-correct (RFC 8414) — it advertises a workingregistration_endpoint,token_endpoint_auth_methods_supportedincluding both public and confidential clients, and PKCE (S256). - The authorization server's access logs show zero incoming requests — not to
.well-known/oauth-authorization-server, not to the registration endpoint. Nothing. Copilot Studio never attempts to contact it after step 2. - I tested whether a trailing slash on the
authorization_serversURL (added by pydantic's URL normalization on my server) was tripping up discovery, by removing it. Identical failure with or without the trailing slash — ruled out.
So the failure happens entirely inside Copilot Studio, between successfully reading my protected-resource metadata and ever attempting to reach the authorization server it just learned about — with no further outbound requests at all.
Microsoft Copilot | Other
2 answers
Sort by: Most helpful
-
Sayali-MSFT 6,486 Reputation points Microsoft External Staff Moderator
2026-08-27T09:08:46.2533333+00:00 Hello @Mardiyyah Oduwole ,
The server-side evidence indicates that the RFC 9728 challenge and protected-resource metadata discovery are completing successfully, but Copilot Studio fails before making any RFC 8414 discovery or dynamic client-registration request to the advertised authorization server. This rules out the trailing slash, token endpoint, PKCE, redirect URI, audience, and authorization-server availability as the immediate cause. The issue is most likely within Copilot Studio’s dynamic OAuth discovery processing or an undocumented authorization-server compatibility restriction.can u share with the correlation ID, UTC timestamp, environment/agent details, sanitized discovery documents, and logs from both servers so engineering can inspect the backend failure immediately after protected-resource metadata parsing.