Azure.Identity Namespace

Classes

AuthenticationFailedException

An exception class raised for errors in authenticating client requests.

AuthenticationRecord

Account information relating to an authentication request.

AuthenticationRequiredException

An exception indicating that interactive authentication is required.

AuthorizationCodeCredential

Authenticates by redeeming an authorization code previously obtained from Azure Active Directory. See https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow for more information about the authorization code authentication flow.

AuthorizationCodeCredentialOptions

Options used to configure the AuthorizationCodeCredential.

AzureApplicationCredential

Provides a TokenCredential implementation which chains the EnvironmentCredential and ManagedIdentityCredential implementations to be tried in order until one of the getToken methods returns a non-default AccessToken.

AzureApplicationCredentialOptions

Options to configure the AzureApplicationCredential authentication flow and requests made to Azure Identity services.

AzureAuthorityHosts

Defines fields exposing the well known authority hosts for the Azure Public Cloud and sovereign clouds.

AzureCliCredential

Enables authentication to Azure Active Directory using Azure CLI to obtain an access token.

AzureCliCredentialOptions

Options for configuring the AzureCliCredential.

AzurePowerShellCredential

Enables authentication to Azure Active Directory using Azure PowerShell to obtain an access token.

AzurePowerShellCredentialOptions

Options for configuring the AzurePowerShellCredential.

ChainedTokenCredential

Provides a TokenCredential implementation which chains multiple TokenCredential implementations to be tried in order until one of the getToken methods returns a non-default AccessToken.

ClientCertificateCredential

Enables authentication of a service principal in to Azure Active Directory using a X509 certificate that is assigned to it's App Registration. More information on how to configure certificate authentication can be found here: https://docs.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad

ClientCertificateCredentialOptions

Options used to configure the ClientCertificateCredential.

ClientSecretCredential

Enables authentication to Azure Active Directory using a client secret that was generated for an App Registration. More information on how to configure a client secret can be found here: https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application

ClientSecretCredentialOptions

Options used to configure the ClientSecretCredential.

CredentialUnavailableException

An exception indicating a TokenCredential did not attempt to authenticate and retrieve AccessToken, as its prerequisite information or state was not available.

DefaultAzureCredential

Provides a default TokenCredential authentication flow for applications that will be deployed to Azure. The following credential types if enabled will be tried, in order:

Consult the documentation of these credential types for more information on how they attempt authentication.
DefaultAzureCredentialOptions

Options to configure the DefaultAzureCredential authentication flow and requests made to Azure Identity services.

DeviceCodeCredential

A TokenCredential implementation which authenticates a user using the device code flow, and provides access tokens for that user account. For more information on the device code authentication flow see https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Device-Code-Flow.

DeviceCodeCredentialOptions

Options to configure the DeviceCodeCredential.

EnvironmentCredential

Enables authentication to Azure Active Directory using client secret, or username and password, details configured in the following environment variables:

VariableDescription
AZURE_TENANT_IDThe Azure Active Directory tenant(directory) ID.
AZURE_CLIENT_IDThe client(application) ID of an App Registration in the tenant.
AZURE_CLIENT_SECRETA client secret that was generated for the App Registration.
AZURE_CLIENT_CERTIFICATE_PATHA path to certificate and private key pair in PEM or PFX format, which can authenticate the App Registration.
AZURE_USERNAMEThe username, also known as upn, of an Azure Active Directory user account.
AZURE_PASSWORDThe password of the Azure Active Directory user account. Note this does not support accounts with MFA enabled.
This credential ultimately uses a ClientSecretCredential, ClientCertificateCredential, or UsernamePasswordCredential to perform the authentication using these details. Please consult the documentation of that class for more details.
IdentityModelFactory

Model factory that enables mocking for the Azure Identity library.

InteractiveBrowserCredential

A TokenCredential implementation which launches the system default browser to interactively authenticate a user, and obtain an access token. The browser will only be launched to authenticate the user once, then will silently acquire access tokens through the users refresh token as long as it's valid.

InteractiveBrowserCredentialOptions

Options to configure the InteractiveBrowserCredential.

ManagedIdentityCredential

Attempts authentication using a managed identity that has been assigned to the deployment environment. This authentication type works in Azure VMs, App Service and Azure Functions applications, as well as the Azure Cloud Shell. More information about configuring managed identities can be found here: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview

OnBehalfOfCredential

Enables authentication to Azure Active Directory using an On-Behalf-Of flow.

OnBehalfOfCredentialOptions
SharedTokenCacheCredential

Authenticates using tokens in the local cache shared between Microsoft applications.

SharedTokenCacheCredentialOptions

Options to configure the SharedTokenCacheCredential authentication.

TokenCacheNotificationDetails

Args setnt to TokenCache OnBefore and OnAfter events.

TokenCachePersistenceOptions

Options controlling the storage of the token cache.

TokenCacheUpdatedArgs

Data regarding an update of a token cache.

TokenCredentialOptions

Options to configure requests made to the OAUTH identity service.

UnsafeTokenCacheOptions

Options controlling the storage of the token cache.

UsernamePasswordCredential

Enables authentication to Azure Active Directory using a user's username and password. If the user has MFA enabled this credential will fail to get a token throwing an AuthenticationFailedException. Also, this credential requires a high degree of trust and is not recommended outside of prototyping when more secure credentials can be used.

UsernamePasswordCredentialOptions

Options to configure the UsernamePasswordCredential.

VisualStudioCodeCredential

Enables authentication to Azure Active Directory using data from Visual Studio Code.

VisualStudioCodeCredentialOptions

Options for configuring the VisualStudioCodeCredential.

VisualStudioCredential

Enables authentication to Azure Active Directory using data from Visual Studio

VisualStudioCredentialOptions

Options for configuring the VisualStudioCredential.

Structs

DeviceCodeInfo

Details of the device code to present to a user to allow them to authenticate through the device code authentication flow.

RegionalAuthority

Identifies the regional authority to be used for authentication.

TokenCacheDetails

Details related to a UnsafeTokenCacheOptions cache delegate.