Microsoft.Identity.Client Namespace

Classes

AbstractAcquireTokenParameterBuilder<T>

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

AbstractApplicationBuilder<T>
AbstractClientAppBaseAcquireTokenParameterBuilder<T>

Base class for parameter builders common to public client application and confidential client application token acquisition operations

AbstractConfidentialClientAcquireTokenParameterBuilder<T>

Base class for confidential client application token request builders

AbstractPublicClientAcquireTokenParameterBuilder<T>

Base class for public client application token request builders

AccountId

An identifier for an account in a specific tenant. Returned by IAccount.HomeAccountId

AcquireTokenByAuthorizationCodeParameterBuilder

Builder for AcquireTokenByAuthorizationCode

AcquireTokenByIntegratedWindowsAuthParameterBuilder

Builder for AcquireTokenByIntegratedWindowsAuth

AcquireTokenByRefreshTokenParameterBuilder

Parameter builder for the AcquireTokenByRefreshToken(IEnumerable<String>, String) method. See https://aka.ms/msal-net-migration-adal2-msal2

AcquireTokenByUsernamePasswordParameterBuilder

Parameter builder for the AcquireTokenByUsernamePassword(IEnumerable<String>, String, SecureString) operation. See https://aka.ms/msal-net-up

AcquireTokenForClientParameterBuilder

Builder for AcquireTokenForClient (used in client credential flows, in daemon applications). See https://aka.ms/msal-net-client-credentials

AcquireTokenInteractiveParameterBuilder

Builder for an Interactive token request. See https://aka.ms/msal-net-acquire-token-interactively

AcquireTokenOnBehalfOfParameterBuilder

Builder for AcquireTokenOnBehalfOf (OBO flow) See https://aka.ms/msal-net-on-behalf-of

AcquireTokenSilentParameterBuilder

Parameter builder for the AcquireTokenSilent(IEnumerable<String>, IAccount) operation. See https://aka.ms/msal-net-acquiretokensilent

AcquireTokenWithDeviceCodeParameterBuilder

Parameters builder for the AcquireTokenWithDeviceCode(IEnumerable<String>, Func<DeviceCodeResult,Task>) operation. See https://aka.ms/msal-net-device-code-flow

ApplicationOptions

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

AuthenticationResult

Contains the results of one token acquisition operation in PublicClientApplication or ConfidentialClientApplication. For details see https://aka.ms/msal-net-authenticationresult

ClientApplicationBase
ClientAssertionCertificate

Certificate for a client assertion. This class is used in one of the constructors of ClientCredential. ClientCredential is itself used in the constructor of ConfidentialClientApplication to pass to Azure AD a shared secret (registered in the Azure AD application)

ClientCredential

Meant to be used in confidential client applications, an instance of ClientCredential is passed to the constructors of (ConfidentialClientApplication) as credentials proving that the application (the client) is what it claims it is. These credentials can be either a client secret (an application password) or a certificate. This class has one constructor for each case. These credentials are added in the application registration portal (in the secret section).

ConfidentialClientApplication

Class to be used for confidential client applications (Web Apps, Web APIs, and daemon applications).

ConfidentialClientApplicationBuilder
ConfidentialClientApplicationOptions

Configuration options for a confidential client application (Web app / Web API / daemon app). See https://aka.ms/msal-net/application-configuration

DeviceCodeResult

This object is returned as part of the device code flow and has information intended to be shown to the user about where to navigate to login and what the device code needs to be entered on that device. See https://aka.ms/msal-device-code-flow.

GetAuthorizationRequestUrlParameterBuilder

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?

Logger
MsalClientException

This exception class represents errors that are local to the library or the device. Contrary to MsalServiceException which represent errors happening from the Azure AD service or the network. For more details, see https://aka.ms/msal-net-exceptions

MsalError

Error code returned as a property in MsalException

MsalException

Base exception type thrown when an error occurs during token acquisition. For more details, see https://aka.ms/msal-net-exceptions

MsalServiceException

Exception type thrown when service returns an error response or other networking errors occur. For more details, see https://aka.ms/msal-net-exceptions

MsalUiRequiredException

This exception class is to inform developers that UI interaction is required for authentication to succeed. It's thrown when calling AcquireTokenSilent(IEnumerable<String>, IAccount) or one of its overrides, and when the token does not exists in the cache, or the user needs to provide more content, or perform multiple factor authentication based on Azure AD policies, etc.. For more details, see https://aka.ms/msal-net-exceptions

PublicClientApplication

Class to be used to acquire tokens in desktop or mobile applications (Desktop / UWP / Xamarin.iOS / Xamarin.Android). public client applications are not trusted to safely keep application secrets, and therefore they only access Web APIs in the name of the user only. For details see https://aka.ms/msal-net-client-applications

PublicClientApplicationBuilder
PublicClientApplicationOptions

Configuration options for a public client application (desktop/mobile app). See https://aka.ms/msal-net/application-configuration

SystemWebViewOptions

Options for using the default OS browser as a separate process to handle interactive auth. MSAL will be listening for the OS browser to finish authenticating, but it cannot close the browser. It can however respond with a 200 OK message or a 302 Redirect, which can be configured here. For more details see https://aka.ms/msal-net-os-browser

TokenCache

Token cache storing access and refresh tokens for accounts This class is used in the constructors of PublicClientApplication and ConfidentialClientApplication. In the case of ConfidentialClientApplication, two instances are used, one for the user token cache, and one for the application token cache (in the case of applications using the client credential flows).

TokenCacheNotificationArgs

Contains parameters used by the MSAL call accessing the cache. See also ITokenCacheSerializer which contains methods to customize the cache serialization. For more details about the token cache see https://aka.ms/msal-net-web-token-cache

TraceTelemetryConfig

A simple ITelemetryConfig implementation that writes data using System.Diagnostics.Trace.

UIParent
UserAssertion

Structs

Prompt

Structure containing static members that you can use to specify how the interactive overrides of AcquireTokenAsync in IPublicClientApplication should prompt the user.

Interfaces

IAccount

The IAccount interface represents information about a single account. The same user can be present in different tenants, that is, a user can have multiple accounts. An IAccount is returned in the AuthenticationResult.Account property, and can be used as parameters of PublicClientApplication and ConfidentialClientApplication methods acquiring tokens such as AcquireTokenSilent(IEnumerable<String>, IAccount)

IAppConfig

Configuration properties used to build a public or confidential client application

IByRefreshToken
IClientApplicationBase
IConfidentialClientApplication

Component to be used with confidential client applications like Web Apps/API.

IConfidentialClientApplicationWithCertificate

Component to be used with confidential client applications like Web Apps/API. This component supports Subject Name + Issuer authentication in order to help, in the future, Azure AD certificates rollover

IMsalHttpClientFactory

Factory responsible for creating HttpClient .Net recommends to use a single instance of HttpClient

IPublicClientApplication

Interface to be used with desktop or mobile applications (Desktop / UWP / Xamarin.iOS / Xamarin.Android). public client applications are not trusted to safely keep application secrets, and therefore they only access Web APIs in the name of the user only. For details see https://aka.ms/msal-net-client-applications.

ITelemetryConfig
ITelemetryEventPayload

Data that represents a single snapshot in the series of events that are collected

ITokenCache

This is the interface that implements the public access to cache operations. With CacheV2, this should only be necessary if the caller is persisting the cache in their own store, since this will provide the serialize/deserialize and before/after notifications used in that scenario. See https://aka.ms/aka.ms/msal-net-token-cache-serialization

ITokenCacheSerializer

This interface will be available in TokenCacheNOtifiactionArgs callback to enable serialization/deserialization of the cache.

Enums

AadAuthorityAudience

Specifies which Microsoft accounts can be used for sign-in with a given application. See https://aka.ms/msal-net-application-configuration

AzureCloudInstance
LogLevel

Level of the log messages. For details see https://aka.ms/msal-net-logging

TelemetryAudienceType

Describes the types of audiences for telemetry. AudienceType

UiRequiredExceptionClassification

Details about the cause of an MsalUiRequiredException, giving a hint about what the user can expect when they go through interactive authentication. See https://aka.ms/msal-net-UiRequiredException for details.

Delegates

LogCallback

Callback delegate that allows application developers to consume logs, and handle them in a custom manner. This callback is set using WithLogging(LogCallback, Nullable<LogLevel>, Nullable<Boolean>, Nullable<Boolean>). If PiiLoggingEnabled is set to true, when registering the callback this method will receive the messages twice: once with the containsPii parameter equals false and the message without PII, and a second time with the containsPii parameter equals to true and the message might contain PII. In some cases (when the message does not contain PII), the message will be the same. For details see https://aka.ms/msal-net-logging

TokenCacheCallback

Notification for certain token cache interactions during token acquisition. This delegate is used in particular to provide a custom token cache serialization. See https://aka.ms/aka.ms/msal-net-token-cache-serialization