Adding WithExtraClientAssertionClaims api#5650
Merged
Conversation
MZOLN
reviewed
Jan 13, 2026
src/client/Microsoft.Identity.Client/ApiConfig/Parameters/AcquireTokenCommonParameters.cs
Show resolved
Hide resolved
MZOLN
reviewed
Jan 13, 2026
src/client/Microsoft.Identity.Client/ApiConfig/AcquireTokenForClientParameterBuilder.cs
Outdated
Show resolved
Hide resolved
MZOLN
reviewed
Jan 13, 2026
MZOLN
reviewed
Jan 13, 2026
MZOLN
reviewed
Jan 13, 2026
src/client/Microsoft.Identity.Client/Internal/Requests/AuthenticationRequestParameters.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 14, 2026
src/client/Microsoft.Identity.Client/ApiConfig/AcquireTokenForClientParameterBuilder.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 14, 2026
src/client/Microsoft.Identity.Client/ApiConfig/AcquireTokenForClientParameterBuilder.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 14, 2026
tests/Microsoft.Identity.Test.Unit/PublicApiTests/ClientCredentialWithCertTest.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 19, 2026
.../Microsoft.Identity.Client/Internal/ClientCredential/CertificateAndClaimsClientCredential.cs
Show resolved
Hide resolved
bgavrilMS
approved these changes
Jan 19, 2026
bgavrilMS
reviewed
Jan 19, 2026
src/client/Microsoft.Identity.Client/AppConfig/ConfidentialClientApplicationBuilder.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 19, 2026
src/client/Microsoft.Identity.Client/AppConfig/ConfidentialClientApplicationBuilder.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 21, 2026
...tity.Client/Extensibility/AbstractConfidentialClientAcquireTokenParameterBuilderExtension.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 21, 2026
...tity.Client/Extensibility/AbstractConfidentialClientAcquireTokenParameterBuilderExtension.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
approved these changes
Jan 21, 2026
MZOLN
approved these changes
Jan 22, 2026
added 2 commits
January 22, 2026 22:19
bgavrilMS
approved these changes
Jan 23, 2026
1 task
This was referenced Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new extensibility API that allows higher-level libraries to specify extra claims for client assertions when acquiring tokens for clients. It also marks the older claims API as obsolete and updates the internal handling of client assertion claims to support both dictionary and JSON string formats. Tests and public API files are updated accordingly.
New extensibility for client assertion claims:
WithExtraClientAssertionClaims(string claimsToSign)method toAcquireTokenForClientParameterBuilder, allowing extra claims (as a JSON string) to be included in the client assertion. This method also ensures cache keys are unique per claims set and is intended for use by higher-level APIs, not direct application use. [1] [2] [3] [4]AcquireTokenCommonParameters,AuthenticationRequestParameters) to store and expose the extra client assertion claims. [1] [2]Client assertion generation logic:
JsonWebTokento accept claims as either a dictionary or a JSON string, and updated the payload generation logic to merge these claims appropriately. [1] [2] [3] [4]CertificateAndClaimsClientCredentialto use the new claims property when generating the JWT for client assertions.API deprecation:
WithClientClaimsmethods onConfidentialClientApplicationBuilderas obsolete, directing users to the newWithExtraClientAssertionClaimsmethod. [1] [2]Test updates:
WithClientClaimsmethod. [1] [2] [3] [4] [5] [6]Fixes #Changes proposed in this request
Testing
Performance impact
Documentation