Table of Contents

Class ApplicationOptions

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

Base class for options objects with string values loadable from a configuration file (for instance a JSON file, as in an asp.net configuration scenario) See https://aka.ms/msal-net-application-configuration See also derived classes PublicClientApplicationOptions and ConfidentialClientApplicationOptions

public abstract class ApplicationOptions : BaseApplicationOptions
Inheritance
ApplicationOptions
Derived
Inherited Members

Constructors

ApplicationOptions()

protected ApplicationOptions()

Properties

AadAuthorityAudience

Sign-in audience. This property is mutually exclusive with TenantId. If both are provided, an exception will be thrown.

public AadAuthorityAudience AadAuthorityAudience { get; set; }

Property Value

AadAuthorityAudience

AzureCloudInstance

Specific instance in the case of Azure Active Directory. It allows users to use the enum instead of the explicit URL. This property is mutually exclusive with Instance. If both are provided, an exception will be thrown.

public AzureCloudInstance AzureCloudInstance { get; set; }

Property Value

AzureCloudInstance

ClientCapabilities

Microsoft Identity specific OIDC extension that allows resource challenges to be resolved without interaction. Allows configuration of one or more client capabilities, e.g. "llt"

public IEnumerable<string> ClientCapabilities { get; set; }

Property Value

IEnumerable<string>

Remarks

MSAL will transform these into special claims request. See https://openid.net/specs/openid-connect-core-1_0-final.html#ClaimsParameter for details on claim requests. For more details see https://aka.ms/msal-net-claims-request

ClientId

Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app)

public string ClientId { get; set; }

Property Value

string

ClientName

The name of the calling application for telemetry purposes.

public string ClientName { get; set; }

Property Value

string

ClientVersion

The version of the calling application for telemetry purposes.

public string ClientVersion { get; set; }

Property Value

string

Instance

STS instance (for instance https://login.microsoftonline.com for the Azure public cloud). The name was chosen to ensure compatibility with AzureAdOptions in ASP.NET Core. This property is mutually exclusive with AzureCloudInstance. If both are provided, an exception will be thrown.

public string Instance { get; set; }

Property Value

string

KerberosServicePrincipalName

Service principal name for Kerberos Service Ticket.

public string KerberosServicePrincipalName { get; set; }

Property Value

string

LegacyCacheCompatibilityEnabled

Enables legacy ADAL cache serialization and deserialization.

public bool LegacyCacheCompatibilityEnabled { get; set; }

Property Value

bool

RedirectUri

This redirect URI needs to be registered in the app registration. See https://aka.ms/msal-net-register-app for details on which redirect URIs are defined by default by MSAL.NET and how to register them. Also use: WithDefaultRedirectUri() which provides a good default for public client applications for all platforms.

For web apps and web APIs, the redirect URI is computed from the URL where the application is running (for instance, baseUrl//signin-oidc for ASP.NET Core web apps).

For daemon applications (confidential client applications using only the Client Credential flow that is calling AcquireTokenForClient), no reply URI is needed.

public string RedirectUri { get; set; }

Property Value

string

Remarks

This is especially important when you deploy an application that you have initially tested locally; you then need to add the reply URL of the deployed application in the application registration portal

TenantId

Tenant from which the application will allow users to sign it. This can be: a domain associated with a tenant, a GUID (tenant id), or a meta-tenant (e.g. consumers). This property is mutually exclusive with AadAuthorityAudience. If both are provided, an exception will be thrown.

public string TenantId { get; set; }

Property Value

string

Remarks

The name of the property was chosen to ensure compatibility with AzureAdOptions in ASP.NET Core configuration files (even the semantics would be tenant)

TicketContainer

Kerberos Service Ticket container to be used.

public KerberosTicketContainer TicketContainer { get; set; }

Property Value

KerberosTicketContainer