Conversation
bgavrilMS
reviewed
Nov 10, 2025
src/client/Microsoft.Identity.Client/AppConfig/ApplicationConfiguration.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 10, 2025
src/client/Microsoft.Identity.Client/AppConfig/ApplicationConfiguration.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 10, 2025
...nt/Microsoft.Identity.Client/Extensibility/ConfidentialClientApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 10, 2025
...nt/Microsoft.Identity.Client/Extensibility/ConfidentialClientApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 10, 2025
...nt/Microsoft.Identity.Client/Extensibility/ConfidentialClientApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces extensibility APIs for client credential flows, enabling dynamic certificate provisioning, custom retry logic for service failures, and execution observation. The changes support scenarios like certificate rotation from Azure Key Vault and custom telemetry collection.
- Dynamic certificate provider callback that's invoked before each token request
- Retry callback for handling service failures with custom logic
- Execution observer for tracking token acquisition results (success or failure)
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
src/client/Microsoft.Identity.Client/Extensibility/ClientCredentialExtensionParameters.cs |
New parameter class providing application context to extensibility callbacks |
src/client/Microsoft.Identity.Client/Extensibility/ExecutionResult.cs |
New result class containing either successful AuthenticationResult or exception |
src/client/Microsoft.Identity.Client/Extensibility/ConfidentialClientApplicationBuilderExtensions.cs |
Extension methods for WithCertificate, OnMsalServiceFailure, and OnSuccess |
src/client/Microsoft.Identity.Client/AppConfig/ApplicationConfiguration.cs |
Adds storage for three new extensibility callback properties |
src/client/Microsoft.Identity.Client/Internal/Requests/ClientCredentialRequest.cs |
Implements retry loop and callback invocation logic for token acquisition |
src/client/Microsoft.Identity.Client/Internal/ClientCredential/CertificateAndClaimsClientCredential.cs |
Adds dynamic certificate resolution via provider callback |
src/client/Microsoft.Identity.Client/ApiConfig/AbstractConfidentialClientAcquireTokenParameterBuilder.cs |
Updates validation to allow dynamic certificate provider |
src/client/Microsoft.Identity.Client/MsalError.cs |
Adds error constant for invalid client credential configuration |
tests/Microsoft.Identity.Test.Unit/PublicApiTests/ConfidentialClientApplicationExtensibilityTests.cs |
Comprehensive integration tests for all three extensibility points |
tests/Microsoft.Identity.Test.Unit/AppConfigTests/ConfidentialClientApplicationExtensibilityApiTests.cs |
Unit tests for builder API and configuration storage |
src/client/Microsoft.Identity.Client/PublicApi/*/PublicAPI.Unshipped.txt |
Documents new public API surface for all target frameworks |
src/client/Microsoft.Identity.Client/Microsoft.Identity.Client.csproj |
Adds new extensibility files to project |
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs |
Modifies exception handling pattern (appears unrelated to extensibility) |
...nt/Microsoft.Identity.Client/Extensibility/ConfidentialClientApplicationBuilderExtensions.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
Show resolved
Hide resolved
.../Microsoft.Identity.Client/Internal/ClientCredential/CertificateAndClaimsClientCredential.cs
Outdated
Show resolved
Hide resolved
...nt/Microsoft.Identity.Client/Extensibility/ConfidentialClientApplicationBuilderExtensions.cs
Show resolved
Hide resolved
...soft.Identity.Test.Unit/AppConfigTests/ConfidentialClientApplicationExtensibilityApiTests.cs
Show resolved
Hide resolved
...soft.Identity.Test.Unit/AppConfigTests/ConfidentialClientApplicationExtensibilityApiTests.cs
Show resolved
Hide resolved
...soft.Identity.Test.Unit/AppConfigTests/ConfidentialClientApplicationExtensibilityApiTests.cs
Show resolved
Hide resolved
...crosoft.Identity.Test.Unit/PublicApiTests/ConfidentialClientApplicationExtensibilityTests.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/Internal/Requests/ClientCredentialRequest.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/Internal/Requests/ClientCredentialRequest.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
tlupes
reviewed
Nov 19, 2025
tlupes
reviewed
Nov 19, 2025
src/client/Microsoft.Identity.Client/Internal/Requests/ClientCredentialRequest.cs
Outdated
Show resolved
Hide resolved
This was referenced Jan 10, 2026
This was referenced Feb 1, 2026
This was referenced Feb 9, 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.
Fixes #5568
Changes proposed in this request
Testing
Performance impact
Documentation