Table of Contents

Class AbstractConfidentialClientAcquireTokenParameterBuilder<T>

Namespace
Microsoft.Identity.Client
Assembly
Microsoft.Identity.Client.dll

Base class for confidential client application token request builders

public abstract class AbstractConfidentialClientAcquireTokenParameterBuilder<T> : AbstractAcquireTokenParameterBuilder<T> where T : AbstractAcquireTokenParameterBuilder<T>

Type Parameters

T
Inheritance
AbstractConfidentialClientAcquireTokenParameterBuilder<T>
Derived
Inherited Members
Extension Methods

Methods

ExecuteAsync(CancellationToken)

Executes the Token request asynchronously, with a possibility of cancelling the asynchronous method.

public override Task<AuthenticationResult> ExecuteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token. See CancellationToken

Returns

Task<AuthenticationResult>

Authentication result containing a token for the requested scopes and parameters set in the builder.

Remarks

Cancellation is not guaranteed, it is best effort. If the operation reaches a point of no return, e.g. tokens are acquired and written to the cache, the task will complete even if cancellation was requested. Do not rely on cancellation tokens for strong consistency.

To learn more about potential exceptions thrown by the function, refer to Exceptions in MSAL.NET.

Validate()

Validates the parameters of the AcquireToken operation.

protected override void Validate()

Exceptions

MsalClientException

WithProofOfPossession(PoPAuthenticationConfiguration)

Modifies the token acquisition request so that the acquired token is a Proof-of-Possession token (PoP), rather than a Bearer token. PoP tokens are similar to Bearer tokens, but are bound to the HTTP request and to a cryptographic key, which MSAL can manage on Windows. See https://aka.ms/msal-net-pop

public T WithProofOfPossession(PoPAuthenticationConfiguration popAuthenticationConfiguration)

Parameters

popAuthenticationConfiguration PoPAuthenticationConfiguration

Configuration properties used to construct a Proof-of-Possession request.

Returns

T

The builder.

Remarks

  • An Authentication header is automatically added to the request.
  • The PoP token is bound to the HTTP request, more specifically to the HTTP method (GET, POST, etc.) and to the Uri (path and query, but not query parameters).
  • MSAL creates, reads and stores a key in memory that will be cycled every 8 hours.
  • This is an experimental API. The method signature may change in the future without involving a major version upgrade.