Skip to content

EntraID doesn't support 'resource' parameter when getting auth-code and token #741

Description

@phamtuanit

Describe the bug
When integrate MCP Client with EntraID via OAuth (hardcode ClientID, ClientSecret), there will be an error saying that AADSTS901002: The 'resource' request parameter is not supported.
I removed the parameter 'resource' in the url then it works.
The same as the payload when retrieve token, there will be 400 - Bad Request if including 'resource'. Modify the code in 'ClientOAuthProvider.cs' to remove 'resource', then it works.

Image Image

To Reproduce
Steps to reproduce the behavior:

  1. Configure simple MCP Server, MCP Client by following this post https://techcommunity.microsoft.com/blog/appsonazureblog/smart-ai-integration-with-the-model-context-protocol-mcp-part-5/4433422
  2. In MCP Client, define SseClientTransport with ClientId, ClientSecret:
Image Image
  1. Start MCP Server, start MCP Client

Expected behavior
Can integrate MCP with EntraID normally. Might have option to skip 'resource'.

Logs
N/A

Additional context
N/A

Activity

  1. changed the title [-]EntraID doesn't support 'resource' parameter when get auth-code and token[/-] [+]EntraID doesn't support 'resource' parameter when getting auth-code and token[/+] on Aug 29, 2025
  2. jeffhandley commented on Feb 24, 2026

    @jeffhandley
    Contributor

    Looks like a duplicate of #648

  3. jeffhandley commented on Jul 19, 2026

    @jeffhandley
    Contributor

    Duplicate of #648 -- consolidating the Microsoft Entra ID auth discussion there. I've carried the specific finding from here (Entra ID rejecting the resource parameter) over to #648.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions