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

Microsoft.Identity.Client.Extensibility.AbstractConfidentialClientAcquireTokenParameterBuilderExtension

Extensions for all AcquireToken methods

Intervenes in the request pipeline, by executing a user provided delegate before MSAL makes the token request. The delegate can modify the request payload by adding or removing body parameters and headers. OnBeforeTokenRequestData

Specifies additional parameters acquired from authentication responses to be cached with the access token that are normally not included in the cache object. these values can be read from the AdditionalResponseParameters parameter.

Sends attributeTokens as the attribute_tokens body parameter and includes them in the cache key. Null/empty/whitespace entries are ignored; a null or empty collection is a no-op.

Enables client applications to provide a custom authentication operation to be used in the token acquisition request.

Specifies client-originated claims to include in the token request. Unlike WithClaims (for server-issued claims challenges), tokens acquired with client claims are cached and the cache entry is keyed on the claims value. Different claims values produce separate cache entries. Use stable, non-dynamic values to avoid unbounded cache growth.

Add extra body parameters to the token request. These parameters are added to the cache key to associate these parameters with the acquired token. Works for confidential client flows (AcquireTokenForClient, AcquireTokenOnBehalfOf, AcquireTokenByAuthorizationCode).

Specifies extra claims to be included in the client assertion. These claims will be merged with default claims when the client assertion is generated. This lets higher level APIs like Microsoft.Identity.Web provide additional claims for the client assertion. Important: tokens are associated with the extra client assertion claims, which impacts cache lookups. This is an extensibility API and should not be used by applications directly.

Specifies an FMI path to be used for the client assertion. This lets higher level APIs like Id.Web provide credentials which are FMI sensitive. Important: tokens are associated with the credential FMI path, which impacts cache lookups This is an extensibility API and should not be used by applications.

Registers a delegate that adds additional tags (dimensions) to the OpenTelemetry metrics MSAL emits for this token acquisition. The delegate is invoked while MSAL records its metrics and receives the ExecutionResult of the acquisition (indicating success or failure, with the result or exception) together with a mutable list of tags. Tags appended to that list are attached to every metric recorded for the request.

public static AbstractAcquireTokenParameterBuilder<T> WithProofOfPosessionKeyId<T>(this AbstractAcquireTokenParameterBuilder<T> builder, string keyId, string expectedTokenTypeFromAad = "Bearer") where T : AbstractAcquireTokenParameterBuilder<T>

Binds the token to a key in the cache.No cryptographic operations is performed on the token.