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

Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<T>

Default constructor for AbstractAcquireTokenParameterBuilder.

public T WithAdfsAuthority(string authorityUri, bool validateAuthority = true)

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

public T WithAuthority(string authorityUri, bool validateAuthority = true)

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.

public T WithAuthority(string cloudInstanceUri, Guid tenantId, bool validateAuthority = true)

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.

public T WithAuthority(string cloudInstanceUri, string tenant, bool validateAuthority = true)

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.

public T WithAuthority(AzureCloudInstance azureCloudInstance, Guid tenantId, bool validateAuthority = true)

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.

public T WithAuthority(AzureCloudInstance azureCloudInstance, string tenant, bool validateAuthority = true)

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.

public T WithAuthority(AzureCloudInstance azureCloudInstance, AadAuthorityAudience authorityAudience, bool validateAuthority = true)

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.

public T WithAuthority(AadAuthorityAudience authorityAudience, bool validateAuthority = true)

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.

public T WithB2CAuthority(string authorityUri)

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

public T WithClaims(string claims)

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 method. See https://aka.ms/msal-exceptions for details as well as https://aka.ms/msal-net-claim-challenge.

public T WithExtraQueryParameters(string extraQueryParameters)

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

protected T WithScopes(IEnumerable<string> scopes)

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.

public T WithTenantId(string tenantId)

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`.

public T WithTenantIdFromAuthority(Uri authorityUri)

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`.