<PackageReference Include="Microsoft.Identity.Client" Version="4.83.1" />

Microsoft.Identity.Client.Extensibility.ConfidentialClientApplicationBuilderExtensions

Extensibility methods for ConfidentialClientApplicationBuilder

Configures an async callback that is invoked when a token acquisition request completes. This callback is invoked once per AcquireTokenForClient call, after all retry attempts have been exhausted. While named OnCompletion for the common case, this callback fires for both successful and failed acquisitions. This enables scenarios such as telemetry, logging, and custom result handling.

Configures an async callback that is invoked when MSAL receives an error response from the identity provider (Security Token Service). The callback determines whether MSAL should retry the token request or propagate the exception. This callback is invoked after each service failure and can be called multiple times until it returns false or the request succeeds.

Allows setting a callback which returns an access token, based on the passed-in parameters. MSAL will pass in its authentication parameters to the callback and it is expected that the callback will construct a AppTokenProviderResult and return it to MSAL. MSAL will cache the token response the same way it does for other authentication results.

Configures an async callback to provide the client credential certificate dynamically. The callback is invoked before each token acquisition request to the identity provider (including retries). This enables scenarios such as certificate rotation and dynamic certificate selection based on application context.