Identity Assertion Grant uses raw authorization server URL as token-exchange audience
Maintainers usually reply within 2 days
@halter73 is already working on this.
Since Jun 25, 2026.
Assessment
This issue has not been assessed yet.
Description
IdentityAssertionGrantProvider.GetAccessTokenAsync (added in #1305) passes authorizationServerUrl.ToString() directly as the audience (and resourceUrl.ToString() as the resource) for the RFC 8693 token exchange at the IdP.
The Python SDK (PR #1721) normalizes the audience to the discovered OAuth issuer (override_audience_with_issuer) rather than the caller-supplied URL. Without that normalization, a trailing slash or path difference between the configured authorizationServerUrl and the issuer advertised in the authorization server metadata can produce an audience that the IdP rejects as a mismatch.
Suggested direction
Consider normalizing the audience to the issuer discovered during authorization server metadata discovery (which GetAccessTokenAsync already fetches as mcpAuthMetadata) per RFC 8693, instead of using the raw configured URL.
Low priority — no reported failures yet, surfacing it so it isn't lost.
Related: #1305
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/csharp-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/csharp-sdk#1867 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/csharp-sdk#1836 ·
Maintainers usually reply within 2 days
-
enhancement needs confirmation
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
modelcontextprotocol/csharp-sdk#678 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement needs confirmation P3 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/csharp-sdk#515 · 6 comments · 3 reactions ·
Maintainers usually reply within 2 days
All issues in modelcontextprotocol/csharp-sdk
Similar issues
-
.NET bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
RayWangQvQ/BiliBiliToolPro#1144 ·
Maintainers usually reply within 1 day
-
area-System.Numerics.Tensors untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dotnet/runtime#134691 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
microsoft/DataFactory.MCP#121 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
unoplatform/uno.templates#2277 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/fluentui-blazor#5344 · 1 comment ·
Maintainers usually reply within 1 day