AbstractAcquireTokenParameterBuilder<T> Class

Definition

Base class for builders of token requests, which attempt to acquire a token based on the provided parameters.

public abstract class AbstractAcquireTokenParameterBuilder<T> where T : AbstractAcquireTokenParameterBuilder<T>
type AbstractAcquireTokenParameterBuilder<'T (requires 'T :> AbstractAcquireTokenParameterBuilder<'T>)> = class
Public MustInherit Class AbstractAcquireTokenParameterBuilder(Of T)

Type Parameters

T
Inheritance
System.Object
AbstractAcquireTokenParameterBuilder<T>
Derived

Constructors

AbstractAcquireTokenParameterBuilder<T>()

Default constructor for AbstractAcquireTokenParameterBuilder.

Methods

ExecuteAsync()

Executes the Token request asynchronously.

ExecuteAsync(CancellationToken)

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

Validate()

Validates the parameters of the AcquireToken operation.

WithAdfsAuthority(String, Boolean)

Adds a known Authority corresponding to an ADFS server. See https://aka.ms/msal-net-adfs.

WithAuthority(AadAuthorityAudience, Boolean)

Adds a known Azure AD authority to the application to sign-in users specifying the sign-in audience (the cloud being the Azure public cloud). See https://aka.ms/msal-net-application-configuration.

WithAuthority(AzureCloudInstance, AadAuthorityAudience, Boolean)

Adds a known Azure AD authority to the application to sign-in users specifying the cloud instance and the sign-in audience. See https://aka.ms/msal-net-application-configuration.

WithAuthority(AzureCloudInstance, Guid, Boolean)

Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its cloud instance and its tenant ID. See https://aka.ms/msal-net-application-configuration.

WithAuthority(AzureCloudInstance, String, Boolean)

Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its cloud instance and its domain name or tenant ID. See https://aka.ms/msal-net-application-configuration.

WithAuthority(String, Boolean)

Specific authority for which the token is requested. Passing a different value than configured at the application constructor narrows down the selection to a specific tenant. This does not change the configured value in the application. This is specific to applications managing several accounts (like a mail client with several mailboxes). See https://aka.ms/msal-net-application-configuration.

WithAuthority(String, Guid, Boolean)

Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) specified by its tenant ID. See https://aka.ms/msal-net-application-configuration.

WithAuthority(String, String, Boolean)

Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its domain name. See https://aka.ms/msal-net-application-configuration.

WithB2CAuthority(String)

Adds a known authority corresponding to an Azure AD B2C policy. See https://aka.ms/msal-net-b2c-specificities

WithClaims(String)

Sets claims in the query. Use when the AAD admin has enabled conditional access. Acquiring the token normally will result in a MsalUiRequiredException with the Claims property set. Retry the token acquisition, and use this value in the WithClaims(String) method. See https://aka.ms/msal-exceptions for details as well as https://aka.ms/msal-net-claim-challenge.

WithCorrelationId(Guid)

Sets the correlation id to be used in the authentication request.

WithExtraQueryParameters(Dictionary<String,String>)

Sets Extra Query Parameters for the query string in the HTTP authentication request.

WithExtraQueryParameters(String)

Sets Extra Query Parameters for the query string in the HTTP authentication request.

WithScopes(IEnumerable<String>)

Specifies which scopes to request. This method is used when your application needs to specify the scopes needed to call a protected API. See https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent to learn more about scopes, permissions and consent, and https://docs.microsoft.com/azure/active-directory/develop/msal-v1-app-scopes to learn how to create scopes for legacy applications which used to expose OAuth2 permissions.

Extension Methods

WithExtraHttpHeaders<T>(AbstractAcquireTokenParameterBuilder<T>, IDictionary<String,String>)

Adds additional Http Headers to the token request.

Applies to