Notifications
Announcements
Swagger of Custom MCP-Connector (created with UI instead of Swagger-code cause of credentials etc.) /// swagger: '2.0' info: title: Mulesoft MCP description: MCP Test Specification, YAML for streamable MCP support in Copilot Studio version: 1.0.0 host: xxxxx basePath: / schemes: - https paths: /mcp: post: summary: Mulesoft Test Car Management Server x-ms-agentic-protocol: mcp-streamable-1.0 operationId: InvokeMCP responses: '200': description: Success security: - oauth2: - https://graph.microsoft.com/.default securityDefinitions: oauth2: type: oauth2 flow: accessCode tokenUrl: https://login.windows.net/common/oauth2/authorize scopes: https://graph.microsoft.com/.default: https://graph.microsoft.com/.default authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize security: - oauth2: - https://graph.microsoft.com/.default ///
Hi, From what you've described, it seems the OAuth2.0 flow completes successfully during the initial handshake, but subsequent requests from Copilot Studio to your MCP server are missing the Bearer token. This breaks the expected behavior, especially for authenticated endpoints like `tools/list`. Here are a few things to check: 1. **Token Propagation**: Ensure that the token obtained during the OAuth "dance" is being stored and reused correctly by Copilot Studio. If the token is not persisted or refreshed, subsequent calls may be unauthenticated. 2. **Connector Configuration**: In your Swagger, the `securityDefinitions` and `security` sections appear correct, but double-check that: - The `tokenUrl` should be `https://login.microsoftonline.com/common/oauth2/token` (not `/authorize`). - The `authorizationUrl` is also correct, but ensure it matches the flow you're using (`accessCode` implies Authorization Code Flow). - The scope `https://graph.microsoft.com/.default` is valid and granted in Azure Entra ID. 3. **Copilot Studio Behavior**: According to [Microsoft's documentation](https://learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-add-existing-server-to-agent) [1](https://learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-add-existing-server-to-agent), Copilot Studio should automatically attach the Bearer token to all subsequent MCP calls after authentication. If this doesn’t happen, it may be due to: - A misconfigured redirect URI or token endpoint. - The token not being stored in the expected variable (`System.User.AccessToken`). - A known issue with token refresh or propagation, as discussed [here](https://community.powerplatform.com/forums/thread/details/?threadid=CDBF3AE9-167D-4548-A6EB-0C1C997801BD) [2](https://community.powerplatform.com/forums/thread/details/?threadid=CDBF3AE9-167D-4548-A6EB-0C1C997801BD). 4. **Testing**: Try using the MCP onboarding wizard in Copilot Studio instead of a manual connector setup. This often ensures proper token handling and tool discovery. 5. **Logging**: If possible, inspect the headers of the failing requests. If the `Authorization: Bearer` header is missing, Copilot Studio may not be correctly binding the token to the session. Please verify if this response was helpful. Thanks and best regards, Daniele *Note: This response was prepared with support from Copilot to ensure clarity and completeness.*
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 270 Super User 2025 Season 2
Romain The Low-Code... 181 Super User 2025 Season 2
S-Venkadesh 93 Moderator