Skip to content

fix: support entra authentication by removing resource since that will nev… - #12321

Closed
adameska wants to merge 11 commits into
anomalyco:devfrom
adameska:feat/support-entra
Closed

adameska wants to merge 11 commits into
anomalyco:devfrom
adameska:feat/support-entra

Conversation

@adameska

@adameska adameska commented Feb 5, 2026 •

Copy link
Copy Markdown

fixes #12308

Would fail before, now i have two entra auth secured MCP servers hooked up:
image

…er match what's setup in microsoft's entra
@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@sergey-tihon

Copy link
Copy Markdown

What are the chances that this will be merged?)

log.info("added client_id to token request", { mcpName: this.mcpName })
}
// Remove resource parameter - Microsoft Entra ID v2.0 uses scope only
params.delete("resource")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct. Entra v2 endpoint supports resource parameters. We added it specifically to support mcp. Check the vscode implementation.

Failing to supply the resource parameter can lead to confused deputy attacks

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://learn.microsoft.com/en-us/entra/identity-platform/scopes-oidc?utm_source=chatgpt.com#using-the-default-scope-with-the-client
Even microsofts examples omit it, it's required in v1 flows but all the documentation i've read (and stuff we've done internally) omit it because it uses the SCOPE param to determine this
image

@rekram1-node

Copy link
Copy Markdown
Collaborator

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entra Authentication for MCP doesn't work

4 participants