Diagnostics options available on TokenCredentialOptions and all sub-types. If set to true, we try to log the account identifiers by parsing the received access token. The account identifiers we try to log are the:
ManagedIdentityCredential now attempts to use the newest "2019-08-01" api version for App Service Managed Identity sources. The newer API version will be used if the IDENTITY_ENDPOINT and IDENTITY_HEADER environment variables are set.OnBehalfOfCredential when the SendCertificateChain option is set. #27679EnvironmentCredential now supports certificate subject name / issuer based authentication with AZURE_CLIENT_SEND_CERTIFICATE_CHAIN environment variable (A community contribution, courtesy of trevorlacey-msft).ManagedIdentityCredential now supports accepting a ResourceIdentifier argument to specify a User Assigned Managed Identity by resource Id rather than client Id. DefaultAzureCredential also supports this via the ManagedIdentityResourceId property of DefaultAzureCredentialOptions.ClientAssertionCredential for authenticating service principals with a presigned client assetion.AuthenticationFailedException from AzurePowerSheellCredential when not logged in on non-windows platforms #23498ManagedIdentityCredential response parsing to handle non-json responses #24158Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
AllowMultiTenantAuthentication option has been removed and the default behavior is now as if it were true. The multi-tenant discovery feature can be totally disabled by either setting an AppContext switch named "Azure.Identity.DisableTenantDiscovery" to true or by setting the environment variable "AZURE_IDENTITY_DISABLE_MULTITENANTAUTH" to "true".IsPIILoggingEnabled property from TokenCredentialOptions, similar functionality is planned to be added to TokenCredentialOptions.Diagnostics in a later release.RegionalAuthority from ClientCertificateCredentialOptions and ClientSecretCredentialOptions, along with the RegionalAuthority type. This feature will stay in preview, and these APIs will be added back in 1.6.0-beta.1.TokenCacheDetails to TokenCacheData.TokenCacheNotificationDetails to TokenCacheRefreshArgs.CacheBytes property on TokenCacheData to be readonly and a required constructor parameter.AuthorizationCodeCredential not specifying correct redirectUrl (Issue #24183)DefaultAzureCredentialOptions now has a InteractiveBrowserClientId property which allows passing a ClientId value to the InteractiveBrowserCredentialwhen constructing aDefaultAzureCredential`.OnBehalfOfCredential which enables authentication to Azure Active Directory using an On-Behalf-Of flow.ManagedIdentityCredential for Azure hosts using federated token exchange for managed identity.ManagedIdentityCredential resiliency. #23028UsernamePasswordCredential to use cached tokens when available #23324MsalConfidentialClient to include MSAL log output in logsAzureCliCredential, AzurePowerShellCredential, VisualStudioCrednetial, and VisualStudioCodeCredential when IsPIILoggingEnabled is set to true.Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
DefaultAzureCredential selects a credential during initialization.AzureApplicationCredentialIsPIILoggingEnabled property to TokenCredentialOptions, which controls whether MSAL PII logging is enabled, and other sensitive credential related logging content.AZURE_POD_IDENTITY_TOKEN_URL to AZURE_POD_IDENTITY_AUTHORITY_HOST. The value should now be a host, for example "http://169.254.169.254" (the default).$PROFILE and checking for updates when using AzurePowerShellCredential.AzureCliCredential when specifying the TenantId option. #23158 (A community contribution, courtesy of tomas-pajurek).az login when needed. #21758EnvironmentCredential where the supplied options were not getting properly applied. #22787ManagedIdentityCredential for Bridge to Kubernetes local development authentication.AllowMultiTenantAuthentication option on TokenCredentialOptions.
AllowMultiTenantAuthentication is false. When this option property is false and the tenant Id configured in the credential options differs from the tenant Id set in the TokenRequestContext sent to a credential, an AuthorizationFailedException will be thrown. This is potentially breaking change as it could be a different exception than what was thrown previously. This exception behavior can be overridden by either setting an AppContext switch named "Azure.Identity.EnableLegacyTenantSelection" to true or by setting the environment variable "AZURE_IDENTITY_ENABLE_LEGACY_TENANT_SELECTION" to "true". Note: AppContext switches can also be configured via configuration like below:OnBehalfOfFlowCredential which enables support for AAD On-Behalf-Of (OBO) flow. See the Azure Active Directory documentation to learn more about OBO flow scenarios.<ItemGroup>
<RuntimeHostConfigurationOption Include="Azure.Identity.EnableLegacyTenantSelection" Value="true" />
</ItemGroup>
RegionalAuthority extensible enumRegionalAuthority property to ClientSecretCredentialOptions and ClientCertificateCredentialOptionsLoginHint property to InteractiveBrowserCredentialOptions which allows a user name to be pre-selected for interactive logins. Setting this option skips the account selection prompt and immediately attempts to login with the specified account.AuthorizationCodeCredentialOptions which allows for configuration of a ReplyUri.AppContext switch named "Azure.Identity.DisableCP1" to true or by setting the environment variable;
"AZURE_IDENTITY_DISABLE_CP1" to "true". Note: AppContext switches can also be configured via configuration like below:
<ItemGroup>
<RuntimeHostConfigurationOption Include="Azure.Identity.DisableCP1" Value="true" />
</ItemGroup>
Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
AzurePowerShellCredential to DefaultAzureCredential (A community contribution, courtesy of olandese)InteractiveBrowserCredential when running in a UI application (#18418).TokenCache class is moved removed from the public API surface and has been replaced by TokenCachePersistenceOptions for configuration of disk based persistence of the token cache.[Serializable] attribute to all custom exception types.ExcludeSharedTokenCacheCredential on DefaultAzureCredentialsOptions to true, to exclude the SharedTokenCacheCredential from the DefaultAzureCredential by default. See BREAKING_CHANGES.mdIDisposable interface has been removed from TokenCache.Claims property on TokenRequestContextHttpExtensions causing the omission of content headers on requests (#17448)EnvironmentCredential to account for both null and empty string when checking for the presense of the environment variables (#18031)ManagedIdentityCredential.ManagedIdentityCredential.ProcessRunner causing VisualStudioCredential and AzureCliCredential to fail intermittently (#16211)VisualStudioCodeCredential to raise CredentialUnavailableException when reading from VS Code's stored secret (#16795)VisualStudioCodeCredential using invalid authentication data when no user is signed in to Visual Studio Code (#15870)ProcessRunner causing AzureCliCredential and VisualStudioCredential to fail due to timeout (#14691, 14207)AzureCliCredential incorrectly parsing expires on property returned from az account get-access-token (#15801)DeviceCodeCredential and InteractiveBrowserCredential to improperly authenticate to the home tenant for silent authentication calls after initial authentication (#13801)SharedTokenCacheCredential on Linux (#12939)IncludeX5CCliamHeader on ClientCertificateCredentialOptions to SendCertificateChainAuthenticationRecordAuthenticationRequiredExceptionClientSecretCredentialOptions and ClientSecretCredential constructor overloads accepting this typeUsernamePasswordCredentialOptions and UsernamePasswordCredential constructor overloads accepting this typeEnablePersistentCache and AllowUnprotectedCache from ClientCertificateCredentialOptions, DeviceCodeCredentialOptions and InteractiveBrowserCredentialOptionsAuthenticationRecord and DisableAutomaticAuthentication from DeviceCodeCredentialOptions and InteractiveBrowserCredentialOptionsAllowUnencryptedCacheand AuthenticationRecord from SharedTokenCacheCredentialOptionsAuthenticate and AuthenticateAsync from DeviceCodeCredential, InteractiveBrowserCredential and UsernamePasswordCredentialTokenCache and TokenCache classes to give more user control over how the tokens are cached and how the cache is persisted.TokenCache property to options for credentials supporting token cache configuration.DeviceCodeCredential to output device code information and authentication instructions in the console, in the case no deviceCodeCallback is specified.
DeviceCodeCallback to DeviceCodeCredentialOptionsDeviceCodeCredentialDeviceCodeCredential constructor overload taking deviceCodeCallback and DeviceCodeCredentialOptions with constructor taking only DeviceCodeCredentialOptions2019-08-01 (#13687)IncludeX5CClaimHeader to ClientCertificateCredentialOptions to enable subject name / issuer authentication with the ClientCertificateCredential.RedirectUri to InteractiveBrowserCredentialOptions to enable authentication with user specified application with a custom redirect url.IdentityModelFactory to enable constructing models from the Azure.Identity library for mocking.DefaultAzureCredential and ChainedTokenCredential (#14408)MsalPublicClient and MsalConfidentialClient to respect CancellationToken during initialization (#13201)VisualStudioCodeCredential crashes on macOS (Issue #14362)VisualStudioCredential and VisualStudioCodeCredential to throw CredentialUnavailableException for ADFS tenant (Issue #14639)DefaultAzureCredential incorrectly catching AuthenticationFailedException (Issue #14974)DefaultAzureCredential throwing exceptions during concurrent calls (Issue #15013)InteractiveBrowserCredential not specifying correct redirectUrl (Issue #13940)AuthenticationRecordAuthenticationRequiredExceptionClientCertificateCredentialOptions and ClientCertificateCredential constructor overloads accepting this typeClientSecretCredentialOptions and ClientSecretCredential constructor overloads accepting this typeDeviceCodeCredentialOptions and DeviceCodeCredential constructor overloads accepting this typeInteractiveBrowserCredentialOptions and InteractiveBrowserCredential constructor overloads accepting this typeUsernamePasswordCredentialOptions and UsernamePasswordCredential constructor overloads accepting this typeAuthenticate and AuthenticateAsync from DeviceCodeCredentialAuthenticate and AuthenticateAsync from InteractiveBrowserCredentialAuthenticate and AuthenticateAsync from UsernamePasswordCredentialAllowUnencryptedCacheand AuthenticationRecord from SharedTokenCacheCredentialOptionsDefaultAzureCredential tracing (Issue #10659)DefaultAzureCredential (Issue #13044)ClientId to AuthenticationRecord.AllowUnencryptedCache to the option classes ClientCertificateCredentialOptions, ClientSecretCredentialOptions, DeviceCodeCredentialOptions, InteractiveBrowserCredentialOptions and SharedTokenCacheCredentialOptions which when set to true allows the credential to fall back to storing tokens in an unencrypted file if no OS level user encryption is available when EnablePersistentCache is set to true.AuthenticationRecord to the option class SharedTokenCacheCredentialOptions to support silent authentication for accounts previously authenticated with an interactive credential.UsernamePasswordCredentialOptions which supports the options EnablePersistentCache and AllowUnencryptedCache.KnownAuthorityHosts to AzureAuthorityHosts
AzureChinaCloud to AzureChinaAzureGermanCloud to AzureGermanyAzureUSGovernment to AzureGovernmentAzureCloud to AzurePublicCloudClientCertificateCredentialOptions and ClientSecretCredentialOptions which support the following new option
EnablePersistentCache configures these credentials to use a persistent cache shared between credentials which set this option. By default the cache is per credential and in memory only.AzureCliCredential, VisualStudioCredential and VisualStudioCodeCredential public to allow direct usage.Authenticate methods to UsernamePasswordCredentialSharedTokenCacheCredential account filter to be case-insensitive (Issue #10816)VisualStudioCodeCredential to properly throw CredentialUnavailableException when re-authentication is needed. (Issue #11595)DeviceCodeCredential and InteractiveBrowserCredential
Authenticate which pro-actively interacts with the user to authenticate if necessary and returns a serializable AuthenticationRecordDeviceCodeCredentialOptions and InteractiveBrowserCredentialOptions which support the following new optionsAuthenticationRecord enables initializing a credential with an AuthenticationRecord returned from a prior call to AuthenticateDisableAutomaticAuthentication disables automatic user interaction causing the credential to throw an AuthenticationRequiredException when interactive authentication is necessary.EnablePersistentCache configures these credentials to use a persistent cache shared between credentials which set this option. By default the cache is per credential and in memory only.DefaultAzureCredential to enable authenticating through Visual StudioDefaultAzureCredential to enable authentication through Visual Studio CodeDefaultAzureCredential to enable authenticating through the Azure CLIClientCertificateCredential now supports being constructed with a path to an unencrypted certificate (in either PFX or PEM format)EnvironmentCredential now supports reading a certificate path from AZURE_CLIENT_CERTIFICATE_PATHEnvironmentCredential did not behave correctly when AZURE_USERNAME and AZURE_PASSWORD where setKnownAuthorityHosts class to aid in sovereign cloud configuration.UsernamePasswordCredential constructor parameter mishandlingManagedIdentityCredential endpoint discovery to avoid throwingManagedIdentityCredential to raise CredentialUnavailableException on 400 return from the service where no identity has been assignedDefaultAzureCredential to more easily root cause failuresSharedTokenCacheCredential to filter accounts by tenant id
SharedTokenCacheCredentialOptions class with properties TenantId and UsernameSharedTokenCacheCredential which accepts SharedTokenCacheCredentialOptionsSharedTokenCacheTenantId to DefaultAzureCredentialOptionsDefaultAzureCredential, InteractiveBrowserCredential, and SharedTokenCacheCredentialInteractiveBrowserTenantId to DefaultAzureCredentialOptionsManagedIdentityCredential authentication with user assigned identitiesAzureCredentialOptions -> TokenCredentialOptions
VerificationUrl -> VerificationUri and changed type from string to UriClientSecretCredential class
ClientIdClientSecretTenantIdClientCertificateCredential class
ClientIdClientCertificateTenantIdDefaultAzureCredential class to derive directly from TokenCredential rather than ChainedTokenCredentialDefaultAzureCredentialOptions class
PreferredAccountUsername -> SharedTokenCacheUsernameIncludeEnvironmentCredential -> ExcludeEnvironmentCredentialIncludeManagedIdentityCredential -> ExcludeManagedIdentityCredentialIncludeSharedTokenCacheCredential -> ExcludeSharedTokenCacheCredentialIncludeInteractiveBrowserCredential -> ExcludeInteractiveBrowserCredentialDeviceCodeInfo class
IntervalVerificationUrl -> VerificationUri and changed type from string to UriInteractiveBrowserCredential class
tenantId and clientId to be consistent with other credential typesSharedTokenCacheCredential class
TokenCredentialOptionsclientId constructor parameterSharedTokenCacheCredentialOptionsTokenCredential implementations in the Azure.Identity library now throw exceptions rather than returning default(AccessToken) when no token is obtainedCredentialUnavailableExcpetion exception type to distinguish cases when failure to obtain an AccessToken was expected
ManagedIdentityCredential IMDS availability check to handle immediate network failuresDefaultAzureCredential constructor overload to enable interactive credential types by defaultDefaultAzureCredentialOptions for configuring the DefaultAzureCredential authentication flowInteractiveBrowserCredential to the DefaultAzureCredential authentication flow, but excluded by defaultInteractiveBrowserCredential and DeviceCodeCredential to optionally accept a tenantId to support non-multitenant applicationsTokenRequest structure rather than string[] for forwards compatibilitySharedTokenCacheCredential to support Single Sign On with developer toolingDefaultAzureCredentialauthentication flow to include the SharedTokenCacheCredentialDeviceCodeCredential classInteractiveBrowserCredential classUsernamePasswordCredential classVersion 1.0.0-preview.1 is the first preview of our efforts to create a user-friendly authentication API for Azure SDK client libraries. For more information about preview releases of other Azure SDK libraries, please visit https://aka.ms/azure-sdk-preview1-net.
DefaultAzureCredential classChainedTokenCredential classClientSecretCredential classClientCertificateCredential classManagedIdentityCredential classSee the documentation for more details. User authentication will be added in an upcoming preview release.