- Updated
Microsoft.Identity.ClientandMicrosoft.Identity.Client.Extensions.Msaldependencies to version 4.83.1.
- All
Azure.Identitytypes have been moved toAzure.Coreand are now available throughTypeForwardedToattributes. This is a non-breaking change — existing code continues to work transparently. See the Migration Guide for details.
- Added a JSON schema segment to the NuGet package that provides IntelliSense and validation for Azure.Identity credential configuration in
appsettings.json.
AddAzureClient,AddKeyedAzureClient, andWithAzureCredentialreturn type changed fromIHostApplicationBuildertoIClientBuilderto align with theIClientBuildercomposition change in System.ClientModel.
- Added support in
ClientCertificateCredentialto specify a path in the form ofcert:/StoreLocation/StoreName/Thumbprintto refer to a certificate in the platform certificate store - such as the Windows Certificate Store on Windows, and the KeyChain on MacOS - instead of a file on disk. For example to load a certificate from the "My" store in the "CurrentUser" location use the pathcert:/CurrentUser/My/E661583E8FABEF4C0BEF694CBC41C28FB81CD870(A community contribution, courtesy of fowl2).
- Updated
Microsoft.Identity.ClientandMicrosoft.Identity.Client.Extensions.Msaldependencies to version 4.83.1.
-
Added experimental
Microsoft.Extensions.ConfigurationandMicrosoft.Extensions.DependencyInjectionintegration for Azure SDK clients. For details, see the Configuration and Dependency Injection documentation. -
The
WorkloadIdentityCredentialOptions.IsAzureProxyEnabledproperty, which enables Azure Kubernetes token proxy mode, is only available in beta releases of this package. -
AzureDeveloperCliCredentialnow parses JSON error output fromazd auth tokento extract clean error messages instead of including raw JSON in exceptions. Error messages like{"type":"consoleMessage","data":{"message":"ERROR: fetching token: ..."}}are now displayed asERROR: fetching token: ....
- Renamed
WorkloadIdentityCredentialOptions.IsAzureKubernetesTokenProxyEnabledtoIsAzureProxyEnabledto follow .NET naming conventions for boolean properties.
-
Fixed a NullReferenceException that occurred during X509Chain validation on Linux when using the Identity Bindings feature.
-
Disabled MSAL's internal retry logic for
ConfidentialClientApplicationandPublicClientApplicationto prevent double retries when combined with Azure SDK's retry policy. Only the configured Azure SDK retry policy is applied, avoiding unexpected additional retry attempts.
- Updated
Microsoft.Identity.ClientandMicrosoft.Identity.Client.Extensions.Msaldependencies to version 4.78.0.
- Updated
Microsoft.Identity.ClientandMicrosoft.Identity.Client.Extensions.Msaldependencies to version 4.78.0.
- Added Kubernetes token proxy support (identity binding mode) to
WorkloadIdentityCredential. When enabled via theIsAzureKubernetesTokenProxyEnabledoption, the credential redirects token requests to an AKS-provided proxy to support scenarios exceeding the 20 federated identity credential limit per Entra ID application. This feature is opt-in and only available when usingWorkloadIdentityCredentialdirectly (not supported byDefaultAzureCredentialorManagedIdentityCredential).
- Deprecated legacy
ManagedIdentityCredentialconstructors. UseManagedIdentityCredential(ManagedIdentityId id)orManagedIdentityCredential(ManagedIdentityCredentialOptions options)instead for clearer intent when specifying system-assigned or user-assigned managed identity. (#53800)
- TenantId is now configured via MSAL's
WithTenantIdinstead ofWithTenantIdFromAuthorityto prevent malformed Uris to the authority.
- Deprecated
BrowserCustomizationOptions.UseEmbeddedWebViewproperty. This option requires additional dependencies on Microsoft.Identity.Client.Desktop and is no longer supported. Consider using brokered authentication instead.
- Added a new
DefaultAzureCredentialconstructor that accepts a custom environment variable name for credential configuration. This provides flexibility beyond the defaultAZURE_TOKEN_CREDENTIALSenvironment variable. The constructor accepts any environment variable name and uses the same credential selection logic as the existingAZURE_TOKEN_CREDENTIALSprocessing. - Added
DefaultAzureCredential.DefaultEnvironmentVariableNameconstant property that returns"AZURE_TOKEN_CREDENTIALS"for convenience when referencing the default environment variable name. AzureCliCredential,AzurePowerShellCredential, andAzureDeveloperCliCredentialnow throw anAuthenticationFailedExceptionwhen theTokenRequestContextincludes claims, as these credentials do not support claims challenges. The exception message includes guidance for handling such scenarios.- When
AZURE_TOKEN_CREDENTIALSor the equivalent custom environment variable is configured toManagedIdentityCredential, theDefaultAzureCredentialdoes not issue a probe request and performs retries with exponential backoff.
- Fixed
AzureDeveloperCliCredentialhanging when theAZD_DEBUGenvironment variable is set by adding the--no-promptflag to prevent interactive prompts (#52005). BrokerCredentialis now included in the chain whenAZURE_TOKEN_CREDENTIALSis set todev.- Fixed an issue that prevented ManagedIdentityCredential from utilizing the token cache in Workload Identity Federation environments.
- Fixed a bug in
DefaultAzureCredentialthat caused the credential chain to be constructed incorrectly when using AZURE_TOKEN_CREDENTIALS in combination withDefaultAzureCredentialOptions.
- The
BrokerCredentialis now always included in theDefaultAzureCredentialchain. If theAzure.Identity.Brokerpackage is not referenced, an exception will be thrown whenGetTokenis called, making its behavior consistent with the rest of the credentials in the chain. - Updated
Microsoft.Identity.Clientdependency to version 4.76.0. - Updated
Microsoft.Identity.Client.Extensions.Msaldependency to version 4.76.0.
- Deprecated
SharedTokenCacheCredential. The supporting credential (SharedTokenCacheCredential) was a legacy mechanism for authenticating clients using credentials provided to Visual Studio. For brokered authentication, consider usingInteractiveBrowserCredentialinstead. The following changes have been made:SharedTokenCacheCredentialclass is marked as[Obsolete]and[EditorBrowsable(EditorBrowsableState.Never)]SharedTokenCacheCredentialOptionsclass is marked as[Obsolete]and[EditorBrowsable(EditorBrowsableState.Never)]DefaultAzureCredentialOptions.ExcludeSharedTokenCacheCredentialproperty is marked as[Obsolete]and[EditorBrowsable(EditorBrowsableState.Never)]SharedTokenCacheUsernameproperty is marked as[Obsolete]and[EditorBrowsable(EditorBrowsableState.Never)]SharedTokenCacheCredentialis no longer included in theDefaultAzureCredentialauthentication flow
- Tenant ID comparisons in credential options are now case-insensitive. This affects
AdditionallyAllowedTenantsvalues which will now be matched against tenant IDs without case sensitivity, making the authentication more resilient to case differences in tenant IDs returned from WWW-Authenticate challenges (#51693).
-
BrokerAuthenticationCredentialhas been renamed asBrokerCredential. -
Added the
EditorBrowsable(Never)attribute to propertyVisualStudioCodeTenantIdasTenantIdis preferred. TheVisualStudioCodeTenantIdproperty exists only to provide backwards compatibility.
-
Expanded the set of acceptable values for environment variable
AZURE_TOKEN_CREDENTIALSto allow for selection of a specific credential in theDefaultAzureCredentialchain. The valid values now include any of the credential names available in the default chain (VisualStudioCredential,VisualStudioCodeCredential,AzureCliCredential,AzurePowerShellCredential,AzureDeveloperCliCredential,EnvironmentCredential,WorkloadIdentityCredential,ManagedIdentityCredential,InteractiveBrowserCredential, orBrokerAuthenticationCredential.) Note:BrokerAuthenticationCredentialrequires that the project include a reference to package Azure.Identity.Broker. -
Re-introduced
VisualStudioCodeCredentialand included it in theDefaultAzureCredentialauthentication flow. This credential now supports Single Sign-On (SSO) through the authentication broker on Windows, macOS, and Linux using the Azure.Identity.Broker package.
ManagedIdentityCredentialnow retries 410 status responses for at least 70 seconds total duration as required by Azure IMDS documentation. Previously, 410 responses were retried with the same short exponential backoff as other status codes, resulting in insufficient retry duration (#50724).ManagedIdentityCredentialthrowsCredentialUnavailableExceptionwhen the IMDS endpoint is unavailable. This addresses a regression in how it behaves in theChainedTokenCredential(47057).
VisualStudioCredentialthrowsCredentialUnavailableExceptionfor all failures except for OperationCancelledException due to cancellation being requested for aCancellationToken. This ensures that it falls through for most failures when part of a chained credential.- Removed
AzureApplicationCredential. For context, see issue 49781.
- Updated
Microsoft.Identity.Clientdependency to version 4.73.1 to take a security fix.
- Added support in
AzurePowerShellCredentialfor theAz.Accounts5.0.0+ (Az 14.0.0+) breaking change whereGet-AzAccessTokenreturnsPSSecureAccessTokenwith aSecureStringToken property instead of plaintext.
- Removed references to
Username,Password,AZURE_USERNAME, andAZURE_PASSWORDin XML comments fromEnvironmentCredentialOptionsandEnvironmentCredentialdue to lack of MFA support. See MFA enforcement details. - Marked
AZURE_USERNAMEandAZURE_PASSWORDas obsolete due to lack of MFA support. See MFA enforcement details. - Added support for the
AZURE_TOKEN_CREDENTIALSenvironment variable toDefaultAzureCredential, which allows for choosing between 'deployed service' and 'developer tools' credentials. Valid values are 'dev' for developer tools and 'prod' for deployed service.
- Fixed an issue where Azure CLI credential could hang or delay due to I/O contention when standard input/output was shared with the host process (#49582).
- Updated
Microsoft.Identity.Clientdependency to version 4.71.1
DefaultAzureCredentialnow includes silent authentication via the authentication broker on Windows if theAzure.Identity.BrokerNuGet package is referenced. This allows for a more seamless authentication experience when using theDefaultAzureCredentialin Windows environments. Setting theExcludeBrokerCredentialproperty onDefaultAzureCredentialOptionsdisables this feature.
DefaultAzureCredentialno longer sends a probe request on each call toGetToken. It now only happens on the first call.
- Marked
VisualStudioCodeCredentialas obsolete because the VS Code Azure Account extension on which this credential relies has been deprecated. See the Azure Account extension deprecation notice here.
VisualStudioCredentialwill now correctly fall through to the next credential in the chain when no account is found by Visual Studio. (#48464)
- Updated Microsoft.Identity.Client dependency to version 4.69.1.
- ManagedIdentityCredential now properly supports CAE.
- An event is now logged when the
ManagedIdentityCredentialis used directly or indirectly via a credential chain indicating which managed identity source was selected and whichManagedIdentityIdwas specified. - Marked
UsernamePasswordCredentialas obsolete because Resource Owner Password Credentials (ROPC) token grant flow is incompatible with multifactor authentication (MFA), which Microsoft Entra ID requires for all tenants. See https://aka.ms/azsdk/identity/mfa for details about MFA enforcement and migration guidance.
- Added a
Subscriptionproperty toAzureCliCredentialOptionsto allow specifying the Azure subscription ID or name to use when authenticating with the Azure CLI.
- Null or empty responses from IMDS probe attempts will now fall through to the next credential in the chain (#47844)
AzurePowerShellCredentialno longer relies on APIs that are not available in Constrained Language Mode.
- Fixed an issue where setting
DefaultAzureCredentialOptions.TenantIdtwice throws anInvalidOperationException(#47035) - Fixed an issue where
ManagedIdentityCredentialdoes not honor theCancellationTokenpassed toGetTokenandGetTokenAsync. (#47156) - Fixed an issue where some credentials in
DefaultAzureCredentialwould not fall through to the next credential in the chain under certain exception conditions. - Fixed a regression in
ManagedIdentityCredentialwhen used in aChainedTokenCredentialwhere the invalid json responses do not fall through to the next credential in the chain. (#47470)
- Fixed a regression that prevented
ManagedIdentityCredentialfrom attempting to detect if Workload Identity is enabled in the current environment. #46653 - Fixed a regression that prevented
DefaultAzureCredentialfrom progressing pastManagedIdentityCredentialin some scenarios where the identity was not available. #46709
- Previously, if a clientID or ResourceID was specified for Cloud Shell managed identity, which is not supported, the clientID or resourceID would be silently ignored. Now, an exception will be thrown if a clientID or resourceID is specified for Cloud Shell managed identity.
- Previously, if a clientID or ResourceID was specified for Service Fabric managed identity, which is not supported, the clientID or resourceID would be silently ignored. Now, an exception will be thrown if a clientID or resourceID is specified for Service Fabric managed identity.
ManagedIdentityCredentialnow supports specifying a user-assigned managed identity by object ID.
- If
DefaultAzureCredentialattempts to authenticate with theMangagedIdentityCredentialand it receives either a failed response that is not json, it will now fall through to the next credential in the chain. #45184 - Fixed the request sent in
AzurePipelinesCredentialso it doesn't result in a redirect response when an invalid system access token is provided. - Updated to version 4.65.0 of Microsoft.Identity.Client to address a bug preventing the use of alternate authority types such as dStS (4927) .
- The logging level passed to MSAL now correlates to the log level configured on your configured
AzureEventSourceListener. Previously, the log level was always set toMicrosoft.Identity.Client.LogLevel.Info. AzurePowerShellCredentialnow utilizes the AsSecureString parameter to Get-AzAccessToken for version 2.17.0 and greater of the Az.Accounts module.- Improved error logging for
AzurePipelinesCredential.
ManagedIdentityCredentialnow supports specifying a user-assigned managed identity by object ID.
- If
DefaultAzureCredentialattempts to authenticate with theMangagedIdentityCredentialand it receives either a failed response that is not json, it will now fall through to the next credential in the chain. #45184
AzurePowerShellCredentialnow utilizes the AsSecureString parameter to Get-AzAccessToken for version 2.17.0 and greater of the Az.Accounts module.
- Previously, if a clientID or ResourceID was specified for Cloud Shell managed identity, which is not supported, the clientID or resourceID would be silently ignored. Now, an exception will be thrown if a clientID or resourceID is specified for Cloud Shell managed identity.
- The logging level passed to MSAL now correlates to the log level configured on your configured
AzureEventSourceListener. Previously, the log level was always set toMicrosoft.Identity.Client.LogLevel.Info.
- Added
AzurePipelinesCredentialfor authenticating with Azure Pipelines service connections. OnBehalfOfCredentialnow supports client assertion callbacks for acquiring tokens on behalf of a user.- All credentials now support setting RefreshOn value if received from MSAL.
- ManagedIdentityCredential sets RefreshOn value of half the token lifetime for AccessTokens with an ExpiresOn value greater than 2 hours in the future.
ClientAssertionCredentialOptionsnow supportsTokenCachePersistenceOptionsfor configuring token cache persistence.
OnBehalfOfCredentialnow supports client assertion callbacks for acquiring tokens on behalf of a user.- All credentials now support setting RefreshOn value if received from MSAL.
- ManagedIdentityCredential sets RefreshOn value of half the token lifetime for AccessTokens with an ExpiresOn value greater than 2 hours in the future.
- The constructor of
AzurePipelinesCredentialnow includes additional required parameters for the Azure Pipelines service connection.
- Bug fixes for
AzurePipelinesCredential - Managed identity bug fixes.
- Managed identity bug fixes.
ClientAssertionCredentialOptionsnow supportsTokenCachePersistenceOptionsfor configuring token cache persistence.- Added
AzurePipelinesCredentialfor authenticating with Azure Pipelines service connections.
- Fixed a regression in
DefaultAzureCredentialprobe request behavior for IMDS managed identity environments. #43796
- Fixed a regression in
DefaultAzureCredentialprobe request behavior for IMDS managed identity environments. #43796
- An experimental overload
Authenticatemethod onInteractiveBrowserCredentialnow supports the experimentalPopTokenRequestContextparameter.
- Fixed an issue which caused claims to be incorrectly added to confidential client credentials such as
DeviceCodeCredential#43468
- Updated Microsoft.Identity.Client and related dependencies to version 4.60.3
AzurePowerShellCredentialnow handles the case where it falls back to legacy PowerShell without relying on the error message string.
DefaultAzureCredentialnow sends a probe request with no retries for IMDS managed identity environments to avoid excessive retry delays when the IMDS endpoint is not available. This should improve credential chain resolution for local development scenarios. See BREAKING_CHANGES.md.
- Claims from the
TokenRequestContextare now correctly sent through to MSAL inConfidentialClientcredentials. #40451. ManagedIdentityCredentialis more lenient with the error message it matches when falling through to the next credential in the chain in the case that Docker Desktop returns a 403 response when attempting to access the IMDS endpoint. #38218
AzureCliCredentialutilizes the newexpires_onproperty returned byaz account get-access-tokento determine token expiration.
- One of Azure.Identity's dependencies, Microsoft.Identity.Client, inadvertently added a dependency to
WindowsFormswhen targetingnetX.0-windowsinstead ofnetX.0in version 4.56.0. An additional installation of .NET Desktop Runtime may be necessary. Manually adding a reference to the latest Microsoft.Identity.Client will remove the need for the .NET Desktop Runtime. #44232
- Distributed tracing with
ActivitySourceis stable and no longer requires the Experimental feature-flag.
ManagedIdentityCredentialwill now correctly retry when the instance metadata endpoint returns a 410 response. #28568
- Updated Microsoft.Identity.Client dependency to version 4.56.0
- Bug fixes for development time credentials.
ManagedIdentityCredentialwill fall through to the next credential in the chain in the case that Docker Desktop returns a 403 response when attempting to access the IMDS endpoint. #38218- Fixed an issue where interactive credentials would still prompt on the first GetToken request even when the cache is populated and an AuthenticationRecord is provided. #38431
- Added
BrowserCustomizationproperty toInteractiveBrowserCredentialto enable web view customization for interactive authentication.
- ManagedIdentityCredential will no longer attempt to parse invalid json payloads on responses from the managed identity endpoint.
- Fixed an issue where AzurePowerShellCredential fails to parse the token response from Azure PowerShell. #22638
- Continuous Access Evaluation (CAE) is now configurable per-request by setting the
IsCaeEnabledproperty ofTokenRequestContextvia its constructor. - Added
IsUnsafeSupportLoggingEnabledproperty toTokenCredentialOptionswhich equates to passing 'true' for theenablePiiLoggingparameter to the 'WithLogging' method on the MSAL client builder.
- Fixed an issue with
TokenCachePersistenceOptionswhere credentials in the same process would share the same cache, even if they had different configured names. - ManagedIdentityCredential now ignores empty ClientId values. #37100
- ManagedIdentityCredential will no longer attempt to parse invalid json payloads on responses from the managed identity endpoint.
- When utilizing
EnvironmentCredentialfromDefaultAzureCredentialthe credential will now override theTENANT_IDenvironment value if the TenantId value is set inDefaultAzureCredentialOptions.
- All developer credentials in the
DefaultAzureCredentialcredential chain will fall through to the next credential in the chain on any failure. Previously, some exceptions would throwAuthenticationFailedException, which stops further progress in the chain.
- Changed visibility of all environment variable based properties on
EnvironmentCredentialOptionsto internal. These options are again only configurable via environment variables.
- Renamed the developer credential options timeout settings as follows:
AzureCliCredentialtoAzureCliCredentialOptions.ProcessTimeoutAzurePowerShellCredentialtoAzurePowerShellCredentialOptions.ProcessTimeoutVisualStudioCredentialtoVisualStudioCredentialOptions.ProcessTimeoutAzureDeveloperCliCredentialtoAzureDeveloperCliCredentialOptions.ProcessTimeout
- Setting
DefaultAzureCredentialOptions.ExcludeWorkloadIdentityCredentialtotruealso excludesTokenExchangeManagedIdentitySourcewhen usingDefaultAzureCredentialselects theManagedIdentityCredential
- Allow
VisualStudioCredentialon non-Windows platforms - Added
AzureDeveloperCliCredentialfor Azure Developer CLI - Added
WorkloadIdentityCredentialto support Azure Workload Identity authentication - Added
WorkloadIdentityCredentialandAzureDeveloperCliCredentialto theDefaultAzureCredentialauthentication flow.
- Fixed
ManagedIdentityCredentialauthentication in sovereign clouds for services specifyingTenantIdthrough authentication challenge #34077
- Previously, if environment variables for username and password auth are set in addition to the AZURE_CLIENT_CERTIFICATE_PATH, EnvironmentCredential would select the
UsernamePasswordCredential. After this change,ClientCertificateCredentialwill be selected, which is consistent with all other languages. This is potentially a behavioral breaking change.
- Fixed error message parsing in
AzurePowerShellCredentialwhich would misinterpret Microsoft Entra ID errors with the need to install PowerShell. #31998 - Fix regional endpoint validation error when using
ManagedIdentityCredential. [#32498])(#32498)
- Fixed an issue when using
ManagedIdentityCredentialin combination with authorities other than Azure public cloud that resulted in a incorrect instance metadata validation error. #32498
- Fixed error message parsing in
AzureCliCredentialwhich would misinterpret Microsoft Entra ID errors with the need to login withaz login. #26894, #29109 ManagedIdentityCredentialwill no longer fail when a response received from the endpoint is invalid JSON. It now treats this scenario as if the credential is unavailable. #30467, #32061
- Credentials that are implemented via launching a sub-process to acquire tokens now have configurable timeouts. This addresses scenarios where these proceses can take longer than the current default timeout values. (A community contribution, courtesy of reynaldoburgos). The affected credentials and their associated options are:
AzureCliCredentialandAzureCliCredentialOptions.CliProcessTimeoutAzurePowerShellCredentialandAzurePowerShellCredentialOptions.PowerShellProcessTimeoutVisualStudioCredentialandVisualStudioCredentialOptions.VisualStudioProcessTimeoutDefaultAzureCredentialandDefaultAzureCredentialOptions.DeveloperCredentialTimeoutNote: this option applies to all developer credentials above when usingDefaultAzureCredential.
Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
- Reintroduced
ManagedIdentityCredentialtoken caching support from 1.7.0-beta.1 EnvironmentCredentialupdated to support specifying a certificate password via theAZURE_CLIENT_CERTIFICATE_PASSWORDenvironment variable
- Excluded
VisualStudioCodeCredentialfromDefaultAzureCredentialtoken chain by default as SDK authentication via Visual Studio Code is broken due to issue #27263. TheVisualStudioCodeCredentialwill be re-enabled in theDefaultAzureCredentialflow once a fix is in place. Issue #30525 tracks this. In the meantime Visual Studio Code users can authenticate their development environment using the Azure CLI.
- Added
AdditionallyAllowedTenantsto the following credential options to force explicit opt-in behavior for multi-tenant authentication:AuthorizationCodeCredentialOptionsAzureCliCredentialOptionsAzurePowerShellCredentialOptionsClientAssertionCredentialOptionsClientCertificateCredentialOptionsClientSecretCredentialOptionsDefaultAzureCredentialOptionsOnBehalfOfCredentialOptionsUsernamePasswordCredentialOptionsVisualStudioCodeCredentialOptionsVisualStudioCredentialOptions
- Added
TenantIdtoDefaultAzureCredentialOptionsto avoid having to setInteractiveBrowserTenantId,SharedTokenCacheTenantId,VisualStudioCodeTenantId, andVisualStudioTenantIdindividually.
- Fixed overly restrictive scope validation to allow the '_' character, for common scopes such as
user_impersonation#30647
- Credential types supporting multi-tenant authentication will now throw
AuthenticationFailedExceptionif the requested tenant ID doesn't match the credential's tenant ID, and is not included in theAdditionallyAllowedTenantsoption. Applications must now explicitly add additional tenants to theAdditionallyAllowedTenantslist, or add '*' to list, to enable acquiring tokens from tenants other than the originally specified tenant ID. See BREAKING_CHANGES.md. ManagedIdentityCredentialtoken caching added in 1.7.0-beta.1 has been removed from this release and will be added back in 1.8.0-beta.1
ManagedIdentityCredentialwill now internally cache tokens. Apps can callGetTokenorGetTokenAsyncdirectly without needing to cache to avoid throttling.
- Fixed
AZURE_REGIONAL_AUTHORITY_NAMEsupport inClientCertificateCredential#29112 - Fixed regression in
SharedTokenCacheCredentialdefault behavior #28029 - Fixed legacy PowerShell discovery failures #28030 (A community contribution, courtesy of nerddtvg)
- Documentation improvements to
TokenCacheRefreshArgsandEnvironmentCredential(Community contributions, courtesy of pmaytak and goenning)
Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
- Added a new property under the
Diagnosticsoptions available onTokenCredentialOptionsand all sub-types. If set totrue, we try to log the account identifiers by parsing the received access token. The account identifiers we try to log are the:- Application or Client Identifier
- User Principal Name
- Tenant Identifier
- Object Identifier of the authenticated user or app
ManagedIdentityCredentialnow attempts to use the newest "2019-08-01" api version for App Service Managed Identity sources. The newer API version will be used if theIDENTITY_ENDPOINTandIDENTITY_HEADERenvironment variables are set.
- Fixed an issue where the x5c header is not sent for
OnBehalfOfCredentialwhen theSendCertificateChainoption is set. #27679
EnvironmentCredentialnow supports certificate subject name / issuer based authentication withAZURE_CLIENT_SEND_CERTIFICATE_CHAINenvironment variable (A community contribution, courtesy of trevorlacey-msft).ManagedIdentityCredentialnow supports accepting aResourceIdentifierargument to specify a User Assigned Managed Identity by resource Id rather than client Id.DefaultAzureCredentialalso supports this via theManagedIdentityResourceIdproperty ofDefaultAzureCredentialOptions.- Added
ClientAssertionCredentialfor authenticating service principals with a presigned client assertion.
- Fixed
AuthenticationFailedExceptionfromAzurePowerSheellCredentialwhen not logged in on non-windows platforms #23498 - Fixed
ManagedIdentityCredentialresponse parsing to handle non-json responses #24158
- Upgraded MSAL dependency to version 4.39.0
Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
- Trevor Lacey (GitHub)
- The
AllowMultiTenantAuthenticationoption 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 anAppContextswitch named "Azure.Identity.DisableTenantDiscovery" totrueor by setting the environment variable "AZURE_IDENTITY_DISABLE_MULTITENANTAUTH" to "true". - Removed the
IsPIILoggingEnabledproperty fromTokenCredentialOptions, similar functionality is planned to be added toTokenCredentialOptions.Diagnosticsin a later release. - Removed
RegionalAuthorityfromClientCertificateCredentialOptionsandClientSecretCredentialOptions, along with theRegionalAuthoritytype. - Renamed struct
TokenCacheDetailstoTokenCacheData. - Renamed class
TokenCacheNotificationDetailstoTokenCacheRefreshArgs. - Updated
CacheBytesproperty onTokenCacheDatato be readonly and a required constructor parameter.
- Fixed issue with
AuthorizationCodeCredentialnot specifying correct redirectUrl (Issue #24183)
- Updated error messages to include links to the Azure.Identity troubleshooting guide.
DefaultAzureCredentialOptionsnow has aInteractiveBrowserClientIdproperty which allows passing a ClientId value to theInteractiveBrowserCredentialwhen constructing aDefaultAzureCredential.- Implement
OnBehalfOfCredentialwhich enables authentication to Microsoft Entra ID using an On-Behalf-Of flow. - Added support to
ManagedIdentityCredentialfor Azure hosts using federated token exchange for managed identity.
- Refactored IMDS discovery to remove socket probing and caching of failures to improve
ManagedIdentityCredentialresiliency. #23028 - Updated
UsernamePasswordCredentialto use cached tokens when available #23324
- Updated credentials using
MsalConfidentialClientto include MSAL log output in logs - Added additional logging to
AzureCliCredential,AzurePowerShellCredential,VisualStudioCredential, andVisualStudioCodeCredentialwhenIsPIILoggingEnabledis set to true.
Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
- Tomas Pajurek (tpajurek-dtml)
- A new trace event is now logged when
DefaultAzureCredentialselects a credential during initialization. - Added
AzureApplicationCredential - Added
IsPIILoggingEnabledproperty toTokenCredentialOptions, which controls whether MSAL PII logging is enabled, and other sensitive credential related logging content.
- Renamed
AZURE_POD_IDENTITY_TOKEN_URLtoAZURE_POD_IDENTITY_AUTHORITY_HOST. The value should now be a host, for example "http://169.254.169.254" (the default).
- Stopped loading
$PROFILEand checking for updates when usingAzurePowerShellCredential. - Fixed unrecognized argument issue in
AzureCliCredentialwhen specifying theTenantIdoption. #23158 (A community contribution, courtesy of tomas-pajurek). - Handled an additional error scenario for AzureCliCredential that prompts developers to run
az loginwhen needed. #21758 - Fixed an issue in
EnvironmentCredentialwhere the suppliedoptionswere not getting properly applied. #22787 - Fixed DateTime parsing to use the current culture in AzurePowerShellCredential. #22638
- Fixed issue resulting in duplicate event source names when executing in Azure Functions
- Added regional STS support to client credential types
- Added
RegionalAuthorityextensible enum - Added
RegionalAuthorityproperty toClientSecretCredentialOptionsandClientCertificateCredentialOptions
- Added
- Added support to
ManagedIdentityCredentialfor Bridge to Kubernetes local development authentication. - TenantId values returned from service challenge responses can now be used to request tokens from the correct tenantId. To support this feature, there is a new
AllowMultiTenantAuthenticationoption onTokenCredentialOptions.- By default,
AllowMultiTenantAuthenticationis false. When this option property is false and the tenant Id configured in the credential options differs from the tenant Id set in theTokenRequestContextsent to a credential, anAuthorizationFailedExceptionwill 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 anAppContextswitch named "Azure.Identity.EnableLegacyTenantSelection" totrueor by setting the environment variable "AZURE_IDENTITY_ENABLE_LEGACY_TENANT_SELECTION" to "true". Note: AppContext switches can also be configured via configuration like below:
- By default,
- Added
OnBehalfOfFlowCredentialwhich enables support for Microsoft Entra On-Behalf-Of (OBO) flow. See the Microsoft Entra ID documentation to learn more about OBO flow scenarios.
<ItemGroup>
<RuntimeHostConfigurationOption Include="Azure.Identity.EnableLegacyTenantSelection" Value="true" />
</ItemGroup>- Added
LoginHintproperty toInteractiveBrowserCredentialOptionswhich 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. - Added
AuthorizationCodeCredentialOptionswhich allows for configuration of a ReplyUri.
- By default, the MSAL Public Client Client Capabilities are populated with "CP1" to enable support for Continuous Access Evaluation (CAE).
This indicates to Microsoft Entra ID that your application is CAE ready and can handle the CAE claim challenge. This capability can be disabled, if necessary, by either setting an
AppContextswitch named "Azure.Identity.DisableCP1" totrueor 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>- The Microsoft Authentication Library (MSAL) dependency versions have been updated to the latest
- Microsoft.Identity.Client version 4.30.1, Microsoft.Identity.Client.Extensions.Msal version 2.18.4.
Thank you to our developer community members who helped to make Azure Identity better with their contributions to this release:
- Marco Mansi (GitHub)
- Added
AzurePowerShellCredentialtoDefaultAzureCredential(A community contribution, courtesy of olandese)
- When logging is enabled, the log output from Microsoft Authentication Library (MSAL) is also logged.
- Fixed an issue where an account credential fails to load from the cache when EnableGuestTenantAuthentication is true and the account found in the cache has multiple matching tenantIds (#18276).
- Fixed deadlock issue in
InteractiveBrowserCredentialwhen running in a UI application (#18418).
TokenCacheclass is moved removed from the public API surface and has been replaced byTokenCachePersistenceOptionsfor configuration of disk based persistence of the token cache.
- Added the
[Serializable]attribute to all custom exception types.
- Update the default value of
ExcludeSharedTokenCacheCredentialonDefaultAzureCredentialsOptionsto true, to exclude theSharedTokenCacheCredentialfrom theDefaultAzureCredentialby default. See BREAKING_CHANGES.md
- The
IDisposableinterface has been removed fromTokenCache.
- All credentials added support to handle the
Claimsproperty onTokenRequestContext
- Fixed issue in
HttpExtensionscausing the omission of content headers on requests (#17448) - Made
EnvironmentCredentialto account for both null and empty string when checking for the presense of the environment variables (#18031)
- Added support for Service Fabric managed identity authentication to
ManagedIdentityCredential. - Added support for Azure Arc managed identity authentication to
ManagedIdentityCredential.
- Fix race condition in
ProcessRunnercausingVisualStudioCredentialandAzureCliCredentialto fail intermittently (#16211) - Fix
VisualStudioCodeCredentialto raiseCredentialUnavailableExceptionwhen reading from VS Code's stored secret (#16795) - Prevent
VisualStudioCodeCredentialusing invalid authentication data when no user is signed in to Visual Studio Code (#15870) - Fix deadlock in
ProcessRunnercausingAzureCliCredentialandVisualStudioCredentialto fail due to timeout (#14691, 14207) - Fix issue with
AzureCliCredentialincorrectly parsing expires on property returned fromaz account get-access-token(#15801) - Fix issue causing
DeviceCodeCredentialandInteractiveBrowserCredentialto improperly authenticate to the home tenant for silent authentication calls after initial authentication (#13801) - Fix cache loading issue in
SharedTokenCacheCredentialon Linux (#12939)
- Rename property
IncludeX5CCliamHeaderonClientCertificateCredentialOptionstoSendCertificateChain - Removing Application Authentication APIs for GA release. These will be reintroduced in 1.4.0-beta.1.
- Removed class
AuthenticationRecord - Removed class
AuthenticationRequiredException - Removed class
ClientSecretCredentialOptionsandClientSecretCredentialconstructor overloads accepting this type - Removed class
UsernamePasswordCredentialOptionsandUsernamePasswordCredentialconstructor overloads accepting this type - Removed properties
EnablePersistentCacheandAllowUnprotectedCachefromClientCertificateCredentialOptions,DeviceCodeCredentialOptionsandInteractiveBrowserCredentialOptions - Removed properties
AuthenticationRecordandDisableAutomaticAuthenticationfromDeviceCodeCredentialOptionsandInteractiveBrowserCredentialOptions - Removed properties
AllowUnencryptedCacheandAuthenticationRecordfromSharedTokenCacheCredentialOptions - Removed methods
AuthenticateandAuthenticateAsyncfromDeviceCodeCredential,InteractiveBrowserCredentialandUsernamePasswordCredential
- Removed class
- Redesigned Application Authentication APIs
- Adds
TokenCacheandTokenCacheclasses to give more user control over how the tokens are cached and how the cache is persisted. - Adds
TokenCacheproperty to options for credentials supporting token cache configuration.
- Adds
- Update
DeviceCodeCredentialto output device code information and authentication instructions in the console, in the case nodeviceCodeCallbackis specified.- Added
DeviceCodeCallbacktoDeviceCodeCredentialOptions - Added default constructor to
DeviceCodeCredential
- Added
- Replaced
DeviceCodeCredentialconstructor overload takingdeviceCodeCallbackandDeviceCodeCredentialOptionswith constructor taking onlyDeviceCodeCredentialOptions
- Restoring Application Authentication APIs from 1.2.0-preview.6
- Added support for App Service Managed Identity API version
2019-08-01(#13687) - Added
IncludeX5CClaimHeadertoClientCertificateCredentialOptionsto enable subject name / issuer authentication with theClientCertificateCredential. - Added
RedirectUritoInteractiveBrowserCredentialOptionsto enable authentication with user specified application with a custom redirect url. - Added
IdentityModelFactoryto enable constructing models from the Azure.Identity library for mocking. - Unify exception handling between
DefaultAzureCredentialandChainedTokenCredential(#14408)
- Updated
MsalPublicClientandMsalConfidentialClientto respectCancellationTokenduring initialization (#13201) - Fixed
VisualStudioCodeCredentialcrashes on macOS (Issue #14362) - Fixed issue with non GUID Client Ids (Issue #14585)
- Update
VisualStudioCredentialandVisualStudioCodeCredentialto throwCredentialUnavailableExceptionfor ADFS tenant (Issue #14639)
- Fixed issue with
DefaultAzureCredentialincorrectly catchingAuthenticationFailedException(Issue #14974) - Fixed issue with
DefaultAzureCredentialthrowing exceptions during concurrent calls (Issue #15013)
- Fixed issue with
InteractiveBrowserCredentialnot specifying correct redirectUrl (Issue #13940)
- Bug in TaskExtensions.EnsureCompleted method that causes it to unconditionally throw an exception in the environments with synchronization context
- Removing Application Authentication APIs for GA release. These will be reintroduced in 1.3.0-preview.
- Removed class
AuthenticationRecord - Removed class
AuthenticationRequiredException - Removed class
ClientCertificateCredentialOptionsandClientCertificateCredentialconstructor overloads accepting this type - Removed class
ClientSecretCredentialOptionsandClientSecretCredentialconstructor overloads accepting this type - Removed class
DeviceCodeCredentialOptionsandDeviceCodeCredentialconstructor overloads accepting this type - Removed class
InteractiveBrowserCredentialOptionsandInteractiveBrowserCredentialconstructor overloads accepting this type - Removed class
UsernamePasswordCredentialOptionsandUsernamePasswordCredentialconstructor overloads accepting this type - Removed methods
AuthenticateandAuthenticateAsyncfromDeviceCodeCredential - Removed methods
AuthenticateandAuthenticateAsyncfromInteractiveBrowserCredential - Removed methods
AuthenticateandAuthenticateAsyncfromUsernamePasswordCredential - Removed properties
AllowUnencryptedCacheandAuthenticationRecordfromSharedTokenCacheCredentialOptions
- Removed class
- Fixed excess errors in
DefaultAzureCredentialtracing (Issue #10659) - Fixed concurrency issue in
DefaultAzureCredential(Issue #13044)
- Added the read only property
ClientIdtoAuthenticationRecord. - Added the property
AllowUnencryptedCacheto the option classesClientCertificateCredentialOptions,ClientSecretCredentialOptions,DeviceCodeCredentialOptions,InteractiveBrowserCredentialOptionsandSharedTokenCacheCredentialOptionswhich 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 whenEnablePersistentCacheis set to true. - Added the property
AuthenticationRecordto the option classSharedTokenCacheCredentialOptionsto support silent authentication for accounts previously authenticated with an interactive credential. - Added option class
UsernamePasswordCredentialOptionswhich supports the optionsEnablePersistentCacheandAllowUnencryptedCache.
- Rename type
KnownAuthorityHoststoAzureAuthorityHosts- Rename property
AzureChinaCloudtoAzureChina - Rename property
AzureGermanCloudtoAzureGermany - Rename property
AzureUSGovernmenttoAzureGovernment - Rename property
AzureCloudtoAzurePublicCloud
- Rename property
- Added options classes
ClientCertificateCredentialOptionsandClientSecretCredentialOptionswhich support the following new optionEnablePersistentCacheconfigures 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.
- Makes
AzureCliCredential,VisualStudioCredentialandVisualStudioCodeCredentialpublic to allow direct usage. - Added
Authenticatemethods toUsernamePasswordCredential
- Fix
SharedTokenCacheCredentialaccount filter to be case-insensitive (Issue #10816) - Update
VisualStudioCodeCredentialto properly throwCredentialUnavailableExceptionwhen re-authentication is needed. (Issue #11595)
- First preview of new API for authenticating users with
DeviceCodeCredentialandInteractiveBrowserCredential- Added method
Authenticatewhich pro-actively interacts with the user to authenticate if necessary and returns a serializableAuthenticationRecord - Added Options classes
DeviceCodeCredentialOptionsandInteractiveBrowserCredentialOptionswhich support the following new optionsAuthenticationRecordenables initializing a credential with anAuthenticationRecordreturned from a prior call toAuthenticateDisableAutomaticAuthenticationdisables automatic user interaction causing the credential to throw anAuthenticationRequiredExceptionwhen interactive authentication is necessary.EnablePersistentCacheconfigures 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.
- Added method
- Updates
DefaultAzureCredentialto enable authenticating through Visual Studio - Updates
DefaultAzureCredentialto enable authentication through Visual Studio Code
- Updating
DefaultAzureCredentialto enable authenticating through the Azure CLI ClientCertificateCredentialnow supports being constructed with a path to an unencrypted certificate (in either PFX or PEM format)EnvironmentCredentialnow supports reading a certificate path fromAZURE_CLIENT_CERTIFICATE_PATH
- Fix an issue where
EnvironmentCredentialdid not behave correctly whenAZURE_USERNAMEandAZURE_PASSWORDwhere set - Added
KnownAuthorityHostsclass to aid in sovereign cloud configuration.
- Fixed
UsernamePasswordCredentialconstructor parameter mishandling - Updated
ManagedIdentityCredentialendpoint discovery to avoid throwing - Fixed
ManagedIdentityCredentialto raiseCredentialUnavailableExceptionon 400 return from the service where no identity has been assigned - Updated error messaging from
DefaultAzureCredentialto more easily root cause failures
- Update
SharedTokenCacheCredentialto filter accounts by tenant id- Added
SharedTokenCacheCredentialOptionsclass with propertiesTenantIdandUsername - Added constructor overload to
SharedTokenCacheCredentialwhich acceptsSharedTokenCacheCredentialOptions - Added property
SharedTokenCacheTenantIdtoDefaultAzureCredentialOptions
- Added
- Support for personal account authentication in
DefaultAzureCredential,InteractiveBrowserCredential, andSharedTokenCacheCredential - Added
InteractiveBrowserTenantIdtoDefaultAzureCredentialOptions - Fixed issue with
ManagedIdentityCredentialauthentication with user assigned identities
- First stable release of Azure.Identity package.
- Rename
AzureCredentialOptions->TokenCredentialOptions- Renamed property
VerificationUrl->VerificationUriand changed type fromstringtoUri
- Renamed property
- Updated
ClientSecretCredentialclass- Removed property
ClientId - Removed property
ClientSecret - Removed property
TenantId
- Removed property
- Updated
ClientCertificateCredentialclass- Removed property
ClientId - Removed property
ClientCertificate - Removed property
TenantId
- Removed property
- Updated
DefaultAzureCredentialclass to derive directly fromTokenCredentialrather thanChainedTokenCredential - Updated
DefaultAzureCredentialOptionsclass- Renamed property
PreferredAccountUsername->SharedTokenCacheUsername - Renamed property
IncludeEnvironmentCredential->ExcludeEnvironmentCredential - Renamed property
IncludeManagedIdentityCredential->ExcludeManagedIdentityCredential - Renamed property
IncludeSharedTokenCacheCredential->ExcludeSharedTokenCacheCredential - Renamed property
IncludeInteractiveBrowserCredential->ExcludeInteractiveBrowserCredential
- Renamed property
- Updated
DeviceCodeInfoclass- Removed property
Interval - Renamed property
VerificationUrl->VerificationUriand changed type fromstringtoUri
- Removed property
- Updated
InteractiveBrowserCredentialclass- Reordered constructor parameters
tenantIdandclientIdto be consistent with other credential types
- Reordered constructor parameters
- Updated
SharedTokenCacheCredentialclass- Updated constructor to take
TokenCredentialOptions - Removed
clientIdconstructor parameter
- Updated constructor to take
- Removed class
SharedTokenCacheCredentialOptions - Updated exception model across the Azure.Identity library.
TokenCredentialimplementations in the Azure.Identity library now throw exceptions rather than returningdefault(AccessToken) when no token is obtained- Added the
CredentialUnavailableExcpetionexception type to distinguish cases when failure to obtain anAccessTokenwas expected
- Adopted Azure.Core 1.0.0
- Update
ManagedIdentityCredentialIMDS availability check to handle immediate network failures - Added a
DefaultAzureCredentialconstructor overload to enable interactive credential types by default
- Adopted Azure.Core 1.0.0-preview.9
- Added
DefaultAzureCredentialOptionsfor configuring theDefaultAzureCredentialauthentication flow - Added
InteractiveBrowserCredentialto theDefaultAzureCredentialauthentication flow, but excluded by default
- Updated
InteractiveBrowserCredentialandDeviceCodeCredentialto optionally accept a tenantId to support non-multitenant applications
- Modified GetToken abstraction to accept
TokenRequeststructure rather thanstring[]for forwards compatibility
- Adopted Azure.Core 1.0.0-preview.8
- Added
SharedTokenCacheCredentialto support Single Sign On with developer tooling - Updated
DefaultAzureCredentialauthentication flow to include theSharedTokenCacheCredential
- Adopted Azure.Core 1.0.0-preview.7
- Adopted Microsoft.Identity.Client 4.1.0
- User Principal Authentication
- Added
DeviceCodeCredentialclass - Added
InteractiveBrowserCredentialclass - Added
UsernamePasswordCredentialclass
- Added
- Support for Azure SDK ASP .NET Core integration
- Added identity client distributed tracing support
- Fix to ManagedIdentityCredential to properly parse expires_on from response
Version 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.
- Azure Service Authentication
- Added
DefaultAzureCredentialclass - Added
ChainedTokenCredentialclass
- Added
- Service Principal Authentication
- Added
ClientSecretCredentialclass - Added
ClientCertificateCredentialclass
- Added
- Managed Identity Authentication
- Added
ManagedIdentityCredentialclass
- Added
See the documentation for more details. User authentication will be added in an upcoming preview release.