Partilhar via


GetAuthorizationRequestUrlParameterBuilder Class

Definition

NOTE: a few of the methods in AbstractAcquireTokenParameterBuilder (e.g. account) don't make sense here. Do we want to create a further base that contains ALL of the common methods, and then have another one including account, etc that are only used for AcquireToken?

public sealed class GetAuthorizationRequestUrlParameterBuilder : Microsoft.Identity.Client.AbstractConfidentialClientAcquireTokenParameterBuilder<Microsoft.Identity.Client.GetAuthorizationRequestUrlParameterBuilder>
type GetAuthorizationRequestUrlParameterBuilder = class
    inherit AbstractConfidentialClientAcquireTokenParameterBuilder<GetAuthorizationRequestUrlParameterBuilder>
Public NotInheritable Class GetAuthorizationRequestUrlParameterBuilder
Inherits AbstractConfidentialClientAcquireTokenParameterBuilder(Of GetAuthorizationRequestUrlParameterBuilder)
Inheritance

Methods

ExecuteAsync()
ExecuteAsync(CancellationToken)
Validate()

Validates the parameters of the AcquireToken operation.

(Inherited from AbstractConfidentialClientAcquireTokenParameterBuilder<T>)
WithAccount(IAccount)
WithAdfsAuthority(String, Boolean)

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

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(AadAuthorityAudience, Boolean)
Obsolete.

Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(AzureCloudInstance, AadAuthorityAudience, Boolean)
Obsolete.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(AzureCloudInstance, Guid, Boolean)
Obsolete.

Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(AzureCloudInstance, String, Boolean)
Obsolete.

Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(String, Boolean)
Obsolete.

Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(String, Guid, Boolean)
Obsolete.

Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithAuthority(String, String, Boolean)
Obsolete.

Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities.

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithB2CAuthority(String)

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

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithCcsRoutingHint(String, String)

To help with resiliency, the AAD backup authentication system operates as an AAD backup. This will provide the AAD backup authentication system with a routing hint to help improve performance during authentication. The hint created with this api will take precedence over the one created with WithLoginHint(String)

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithCorrelationId(Guid)

Sets the correlation id to be used in the authentication request. Used to track a request in the logs of both the SDK and the Identity Provider service. If not set, a random one will be generated.

(Inherited from BaseAbstractAcquireTokenParameterBuilder<T>)
WithExtraQueryParameters(Dictionary<String,String>)

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

(Inherited from BaseAbstractAcquireTokenParameterBuilder<T>)
WithExtraQueryParameters(String)

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

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithExtraScopesToConsent(IEnumerable<String>)
WithLoginHint(String)
WithPkce(String)

Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636

WithPrompt(Prompt)

Specifies the interactive experience for the user.

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

(Inherited from AbstractConfidentialClientAcquireTokenParameterBuilder<T>)
WithRedirectUri(String)

Sets the redirect URI to add to the Authorization request URL

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.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithTenantId(String)

Overrides the tenant ID specified in the authority at the application level. This operation preserves the authority host (environment).

If an authority was not specified at the application level, the default used is https://login.microsoftonline.com/common.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)
WithTenantIdFromAuthority(Uri)

Extracts the tenant ID from the provided authority URI and overrides the tenant ID specified in the authority at the application level. This operation preserves the authority host (environment) provided to the application builder. If an authority was not provided to the application builder, this method will replace the tenant ID in the default authority - https://login.microsoftonline.com/common.

(Inherited from AbstractAcquireTokenParameterBuilder<T>)

Extension Methods

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

Adds additional Http Headers to the token request.

OnBeforeTokenRequest<T>(AbstractAcquireTokenParameterBuilder<T>, Func<OnBeforeTokenRequestData,Task>)

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

WithAdditionalCacheParameters<T>(AbstractAcquireTokenParameterBuilder<T>, IEnumerable<String>)

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.

WithAuthenticationExtension<T>(AbstractAcquireTokenParameterBuilder<T>, MsalAuthenticationExtension)

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

WithProofOfPosessionKeyId<T>(AbstractAcquireTokenParameterBuilder<T>, String, String)

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

Applies to