- Fixed an issue where setting
DefaultAzureCredentialOptions.TenantId
twice throws anInvalidOperationException
(#47035) - Fixed an issue where
ManagedIdentityCredential
does not honor theCancellationToken
passed toGetToken
andGetTokenAsync
. (#47156) - Fixed an issue where some credentials in
DefaultAzureCredential
would not fall through to the next credential in the chain under certain exception conditions.
- Fixed a regression that prevented
ManagedIdentityCredential
from attempting to detect if Workload Identity is enabled in the current environment. #46653 - Fixed a regression that prevented
DefaultAzureCredential
from progressing pastManagedIdentityCredential
in 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.
ManagedIdentityCredential
now supports specifying a user-assigned managed identity by object ID.
- If
DefaultAzureCredential
attempts to authenticate with theMangagedIdentityCredential
and 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
AzurePipelinesCredential
so 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
. AzurePowerShellCredential
now utilizes the AsSecureString parameter to Get-AzAccessToken for version 2.17.0 and greater of the Az.Accounts module.- Improved error logging for
AzurePipelinesCredential
.
ManagedIdentityCredential
now supports specifying a user-assigned managed identity by object ID.
- If
DefaultAzureCredential
attempts to authenticate with theMangagedIdentityCredential
and it receives either a failed response that is not json, it will now fall through to the next credential in the chain. #45184
AzurePowerShellCredential
now 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
AzurePipelinesCredential
for authenticating with Azure Pipelines service connections. OnBehalfOfCredential
now 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.
ClientAssertionCredentialOptions
now supportsTokenCachePersistenceOptions
for configuring token cache persistence.
OnBehalfOfCredential
now 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
AzurePipelinesCredential
now includes additional required parameters for the Azure Pipelines service connection.
- Bug fixes for
AzurePipelinesCredential
- Managed identity bug fixes.
- Managed identity bug fixes.
ClientAssertionCredentialOptions
now supportsTokenCachePersistenceOptions
for configuring token cache persistence.- Added
AzurePipelinesCredential
for authenticating with Azure Pipelines service connections.
- Fixed a regression in
DefaultAzureCredential
probe request behavior for IMDS managed identity environments. #43796
- Fixed a regression in
DefaultAzureCredential
probe request behavior for IMDS managed identity environments. #43796
- An experimental overload
Authenticate
method onInteractiveBrowserCredential
now supports the experimentalPopTokenRequestContext
parameter.
- 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
AzurePowerShellCredential
now handles the case where it falls back to legacy PowerShell without relying on the error message string.
DefaultAzureCredential
now 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
TokenRequestContext
are now correctly sent through to MSAL inConfidentialClient
credentials. #40451. ManagedIdentityCredential
is 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
AzureCliCredential
utilizes the newexpires_on
property returned byaz account get-access-token
to determine token expiration.
- One of Azure.Identity's dependencies, Microsoft.Identity.Client, inadvertently added a dependency to
WindowsForms
when targetingnetX.0-windows
instead ofnetX.0
in 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
ActivitySource
is stable and no longer requires the Experimental feature-flag.
ManagedIdentityCredential
will 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.
ManagedIdentityCredential
will 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
BrowserCustomization
property toInteractiveBrowserCredential
to 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
IsCaeEnabled
property ofTokenRequestContext
via its constructor. - Added
IsUnsafeSupportLoggingEnabled
property toTokenCredentialOptions
which equates to passing 'true' for theenablePiiLogging
parameter to the 'WithLogging' method on the MSAL client builder.
- Fixed an issue with
TokenCachePersistenceOptions
where 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
EnvironmentCredential
fromDefaultAzureCredential
the credential will now override theTENANT_ID
environment value if the TenantId value is set inDefaultAzureCredentialOptions
.
- All developer credentials in the
DefaultAzureCredential
credential 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
EnvironmentCredentialOptions
to internal. These options are again only configurable via environment variables.
- Renamed the developer credential options timeout settings as follows:
AzureCliCredential
toAzureCliCredentialOptions.ProcessTimeout
AzurePowerShellCredential
toAzurePowerShellCredentialOptions.ProcessTimeout
VisualStudioCredential
toVisualStudioCredentialOptions.ProcessTimeout
AzureDeveloperCliCredential
toAzureDeveloperCliCredentialOptions.ProcessTimeout
- Setting
DefaultAzureCredentialOptions.ExcludeWorkloadIdentityCredential
totrue
also excludesTokenExchangeManagedIdentitySource
when usingDefaultAzureCredential
selects theManagedIdentityCredential
- Allow
VisualStudioCredential
on non-Windows platforms - Added
AzureDeveloperCliCredential
for Azure Developer CLI - Added
WorkloadIdentityCredential
to support Azure Workload Identity authentication - Added
WorkloadIdentityCredential
andAzureDeveloperCliCredential
to theDefaultAzureCredential
authentication flow.
- Fixed
ManagedIdentityCredential
authentication in sovereign clouds for services specifyingTenantId
through 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,ClientCertificateCredential
will be selected, which is consistent with all other languages. This is potentially a behavioral breaking change.
- Fixed error message parsing in
AzurePowerShellCredential
which 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
ManagedIdentityCredential
in combination with authorities other than Azure public cloud that resulted in a incorrect instance metadata validation error. #32498
- Fixed error message parsing in
AzureCliCredential
which would misinterpret Microsoft Entra ID errors with the need to login withaz login
. #26894, #29109 ManagedIdentityCredential
will 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:
AzureCliCredential
andAzureCliCredentialOptions.CliProcessTimeout
AzurePowerShellCredential
andAzurePowerShellCredentialOptions.PowerShellProcessTimeout
VisualStudioCredential
andVisualStudioCredentialOptions.VisualStudioProcessTimeout
DefaultAzureCredential
andDefaultAzureCredentialOptions.DeveloperCredentialTimeout
Note: 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
ManagedIdentityCredential
token caching support from 1.7.0-beta.1 EnvironmentCredential
updated to support specifying a certificate password via theAZURE_CLIENT_CERTIFICATE_PASSWORD
environment variable
- Excluded
VisualStudioCodeCredential
fromDefaultAzureCredential
token chain by default as SDK authentication via Visual Studio Code is broken due to issue #27263. TheVisualStudioCodeCredential
will be re-enabled in theDefaultAzureCredential
flow 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
AdditionallyAllowedTenants
to the following credential options to force explicit opt-in behavior for multi-tenant authentication:AuthorizationCodeCredentialOptions
AzureCliCredentialOptions
AzurePowerShellCredentialOptions
ClientAssertionCredentialOptions
ClientCertificateCredentialOptions
ClientSecretCredentialOptions
DefaultAzureCredentialOptions
OnBehalfOfCredentialOptions
UsernamePasswordCredentialOptions
VisualStudioCodeCredentialOptions
VisualStudioCredentialOptions
- Added
TenantId
toDefaultAzureCredentialOptions
to avoid having to setInteractiveBrowserTenantId
,SharedTokenCacheTenantId
,VisualStudioCodeTenantId
, andVisualStudioTenantId
individually.
- 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
AuthenticationFailedException
if the requested tenant ID doesn't match the credential's tenant ID, and is not included in theAdditionallyAllowedTenants
option. Applications must now explicitly add additional tenants to theAdditionallyAllowedTenants
list, or add '*' to list, to enable acquiring tokens from tenants other than the originally specified tenant ID. See BREAKING_CHANGES.md. ManagedIdentityCredential
token 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
ManagedIdentityCredential
will now internally cache tokens. Apps can callGetToken
orGetTokenAsync
directly without needing to cache to avoid throttling.
- Fixed
AZURE_REGIONAL_AUTHORITY_NAME
support inClientCertificateCredential
#29112 - Fixed regression in
SharedTokenCacheCredential
default behavior #28029 - Fixed legacy PowerShell discovery failures #28030 (A community contribution, courtesy of nerddtvg)
- Documentation improvements to
TokenCacheRefreshArgs
andEnvironmentCredential
(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
Diagnostics
options available onTokenCredentialOptions
and 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
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 theIDENTITY_ENDPOINT
andIDENTITY_HEADER
environment variables are set.
- Fixed an issue where the x5c header is not sent for
OnBehalfOfCredential
when theSendCertificateChain
option is set. #27679
EnvironmentCredential
now supports certificate subject name / issuer based authentication withAZURE_CLIENT_SEND_CERTIFICATE_CHAIN
environment variable (A community contribution, courtesy of trevorlacey-msft).ManagedIdentityCredential
now supports accepting aResourceIdentifier
argument to specify a User Assigned Managed Identity by resource Id rather than client Id.DefaultAzureCredential
also supports this via theManagedIdentityResourceId
property ofDefaultAzureCredentialOptions
.- Added
ClientAssertionCredential
for authenticating service principals with a presigned client assertion.
- Fixed
AuthenticationFailedException
fromAzurePowerSheellCredential
when not logged in on non-windows platforms #23498 - Fixed
ManagedIdentityCredential
response 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
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 anAppContext
switch named "Azure.Identity.DisableTenantDiscovery" totrue
or by setting the environment variable "AZURE_IDENTITY_DISABLE_MULTITENANTAUTH" to "true". - Removed the
IsPIILoggingEnabled
property fromTokenCredentialOptions
, similar functionality is planned to be added toTokenCredentialOptions.Diagnostics
in a later release. - Removed
RegionalAuthority
fromClientCertificateCredentialOptions
andClientSecretCredentialOptions
, along with theRegionalAuthority
type. - Renamed struct
TokenCacheDetails
toTokenCacheData
. - Renamed class
TokenCacheNotificationDetails
toTokenCacheRefreshArgs
. - Updated
CacheBytes
property onTokenCacheData
to be readonly and a required constructor parameter.
- Fixed issue with
AuthorizationCodeCredential
not specifying correct redirectUrl (Issue #24183)
- Updated error messages to include links to the Azure.Identity troubleshooting guide.
DefaultAzureCredentialOptions
now has aInteractiveBrowserClientId
property which allows passing a ClientId value to theInteractiveBrowserCredential
when constructing aDefaultAzureCredential
.- Implement
OnBehalfOfCredential
which enables authentication to Microsoft Entra ID using an On-Behalf-Of flow. - Added support to
ManagedIdentityCredential
for Azure hosts using federated token exchange for managed identity.
- Refactored IMDS discovery to remove socket probing and caching of failures to improve
ManagedIdentityCredential
resiliency. #23028 - Updated
UsernamePasswordCredential
to use cached tokens when available #23324
- Updated credentials using
MsalConfidentialClient
to include MSAL log output in logs - Added additional logging to
AzureCliCredential
,AzurePowerShellCredential
,VisualStudioCredential
, andVisualStudioCodeCredential
whenIsPIILoggingEnabled
is 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
DefaultAzureCredential
selects a credential during initialization. - Added
AzureApplicationCredential
- Added
IsPIILoggingEnabled
property toTokenCredentialOptions
, which controls whether MSAL PII logging is enabled, and other sensitive credential related logging content.
- Renamed
AZURE_POD_IDENTITY_TOKEN_URL
toAZURE_POD_IDENTITY_AUTHORITY_HOST
. The value should now be a host, for example "http://169.254.169.254" (the default).
- Stopped loading
$PROFILE
and checking for updates when usingAzurePowerShellCredential
. - Fixed unrecognized argument issue in
AzureCliCredential
when specifying theTenantId
option. #23158 (A community contribution, courtesy of tomas-pajurek). - Handled an additional error scenario for AzureCliCredential that prompts developers to run
az login
when needed. #21758 - Fixed an issue in
EnvironmentCredential
where the suppliedoptions
were 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
RegionalAuthority
extensible enum - Added
RegionalAuthority
property toClientSecretCredentialOptions
andClientCertificateCredentialOptions
- Added
- Added support to
ManagedIdentityCredential
for 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
AllowMultiTenantAuthentication
option onTokenCredentialOptions
.- By default,
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 theTokenRequestContext
sent to a credential, anAuthorizationFailedException
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 anAppContext
switch named "Azure.Identity.EnableLegacyTenantSelection" totrue
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:
- By default,
- Added
OnBehalfOfFlowCredential
which 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
LoginHint
property toInteractiveBrowserCredentialOptions
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. - Added
AuthorizationCodeCredentialOptions
which 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
AppContext
switch named "Azure.Identity.DisableCP1" totrue
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>
- 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
AzurePowerShellCredential
toDefaultAzureCredential
(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
InteractiveBrowserCredential
when running in a UI application (#18418).
TokenCache
class is moved removed from the public API surface and has been replaced byTokenCachePersistenceOptions
for configuration of disk based persistence of the token cache.
- Added the
[Serializable]
attribute to all custom exception types.
- Update the default value of
ExcludeSharedTokenCacheCredential
onDefaultAzureCredentialsOptions
to true, to exclude theSharedTokenCacheCredential
from theDefaultAzureCredential
by default. See BREAKING_CHANGES.md
- The
IDisposable
interface has been removed fromTokenCache
.
- All credentials added support to handle the
Claims
property onTokenRequestContext
- Fixed issue in
HttpExtensions
causing the omission of content headers on requests (#17448) - Made
EnvironmentCredential
to 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
ProcessRunner
causingVisualStudioCredential
andAzureCliCredential
to fail intermittently (#16211) - Fix
VisualStudioCodeCredential
to raiseCredentialUnavailableException
when reading from VS Code's stored secret (#16795) - Prevent
VisualStudioCodeCredential
using invalid authentication data when no user is signed in to Visual Studio Code (#15870) - Fix deadlock in
ProcessRunner
causingAzureCliCredential
andVisualStudioCredential
to fail due to timeout (#14691, 14207) - Fix issue with
AzureCliCredential
incorrectly parsing expires on property returned fromaz account get-access-token
(#15801) - Fix issue causing
DeviceCodeCredential
andInteractiveBrowserCredential
to improperly authenticate to the home tenant for silent authentication calls after initial authentication (#13801) - Fix cache loading issue in
SharedTokenCacheCredential
on Linux (#12939)
- Rename property
IncludeX5CCliamHeader
onClientCertificateCredentialOptions
toSendCertificateChain
- 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
ClientSecretCredentialOptions
andClientSecretCredential
constructor overloads accepting this type - Removed class
UsernamePasswordCredentialOptions
andUsernamePasswordCredential
constructor overloads accepting this type - Removed properties
EnablePersistentCache
andAllowUnprotectedCache
fromClientCertificateCredentialOptions
,DeviceCodeCredentialOptions
andInteractiveBrowserCredentialOptions
- Removed properties
AuthenticationRecord
andDisableAutomaticAuthentication
fromDeviceCodeCredentialOptions
andInteractiveBrowserCredentialOptions
- Removed properties
AllowUnencryptedCache
andAuthenticationRecord
fromSharedTokenCacheCredentialOptions
- Removed methods
Authenticate
andAuthenticateAsync
fromDeviceCodeCredential
,InteractiveBrowserCredential
andUsernamePasswordCredential
- Removed class
- Redesigned Application Authentication APIs
- Adds
TokenCache
andTokenCache
classes to give more user control over how the tokens are cached and how the cache is persisted. - Adds
TokenCache
property to options for credentials supporting token cache configuration.
- Adds
- Update
DeviceCodeCredential
to output device code information and authentication instructions in the console, in the case nodeviceCodeCallback
is specified.- Added
DeviceCodeCallback
toDeviceCodeCredentialOptions
- Added default constructor to
DeviceCodeCredential
- Added
- Replaced
DeviceCodeCredential
constructor overload takingdeviceCodeCallback
andDeviceCodeCredentialOptions
with 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
IncludeX5CClaimHeader
toClientCertificateCredentialOptions
to enable subject name / issuer authentication with theClientCertificateCredential
. - Added
RedirectUri
toInteractiveBrowserCredentialOptions
to enable authentication with user specified application with a custom redirect url. - Added
IdentityModelFactory
to enable constructing models from the Azure.Identity library for mocking. - Unify exception handling between
DefaultAzureCredential
andChainedTokenCredential
(#14408)
- Updated
MsalPublicClient
andMsalConfidentialClient
to respectCancellationToken
during initialization (#13201) - Fixed
VisualStudioCodeCredential
crashes on macOS (Issue #14362) - Fixed issue with non GUID Client Ids (Issue #14585)
- Update
VisualStudioCredential
andVisualStudioCodeCredential
to throwCredentialUnavailableException
for ADFS tenant (Issue #14639)
- Fixed issue with
DefaultAzureCredential
incorrectly catchingAuthenticationFailedException
(Issue #14974) - Fixed issue with
DefaultAzureCredential
throwing exceptions during concurrent calls (Issue #15013)
- Fixed issue with
InteractiveBrowserCredential
not 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
ClientCertificateCredentialOptions
andClientCertificateCredential
constructor overloads accepting this type - Removed class
ClientSecretCredentialOptions
andClientSecretCredential
constructor overloads accepting this type - Removed class
DeviceCodeCredentialOptions
andDeviceCodeCredential
constructor overloads accepting this type - Removed class
InteractiveBrowserCredentialOptions
andInteractiveBrowserCredential
constructor overloads accepting this type - Removed class
UsernamePasswordCredentialOptions
andUsernamePasswordCredential
constructor overloads accepting this type - Removed methods
Authenticate
andAuthenticateAsync
fromDeviceCodeCredential
- Removed methods
Authenticate
andAuthenticateAsync
fromInteractiveBrowserCredential
- Removed methods
Authenticate
andAuthenticateAsync
fromUsernamePasswordCredential
- Removed properties
AllowUnencryptedCache
andAuthenticationRecord
fromSharedTokenCacheCredentialOptions
- Removed class
- Fixed excess errors in
DefaultAzureCredential
tracing (Issue #10659) - Fixed concurrency issue in
DefaultAzureCredential
(Issue #13044)
- Added the read only property
ClientId
toAuthenticationRecord
. - Added the property
AllowUnencryptedCache
to the option classesClientCertificateCredentialOptions
,ClientSecretCredentialOptions
,DeviceCodeCredentialOptions
,InteractiveBrowserCredentialOptions
andSharedTokenCacheCredentialOptions
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 whenEnablePersistentCache
is set to true. - Added the property
AuthenticationRecord
to the option classSharedTokenCacheCredentialOptions
to support silent authentication for accounts previously authenticated with an interactive credential. - Added option class
UsernamePasswordCredentialOptions
which supports the optionsEnablePersistentCache
andAllowUnencryptedCache
.
- Rename type
KnownAuthorityHosts
toAzureAuthorityHosts
- Rename property
AzureChinaCloud
toAzureChina
- Rename property
AzureGermanCloud
toAzureGermany
- Rename property
AzureUSGovernment
toAzureGovernment
- Rename property
AzureCloud
toAzurePublicCloud
- Rename property
- Added options classes
ClientCertificateCredentialOptions
andClientSecretCredentialOptions
which support the following new optionEnablePersistentCache
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.
- Makes
AzureCliCredential
,VisualStudioCredential
andVisualStudioCodeCredential
public to allow direct usage. - Added
Authenticate
methods toUsernamePasswordCredential
- Fix
SharedTokenCacheCredential
account filter to be case-insensitive (Issue #10816) - Update
VisualStudioCodeCredential
to properly throwCredentialUnavailableException
when re-authentication is needed. (Issue #11595)
- First preview of new API for authenticating users with
DeviceCodeCredential
andInteractiveBrowserCredential
- Added method
Authenticate
which pro-actively interacts with the user to authenticate if necessary and returns a serializableAuthenticationRecord
- Added Options classes
DeviceCodeCredentialOptions
andInteractiveBrowserCredentialOptions
which support the following new optionsAuthenticationRecord
enables initializing a credential with anAuthenticationRecord
returned from a prior call toAuthenticate
DisableAutomaticAuthentication
disables automatic user interaction causing the credential to throw anAuthenticationRequiredException
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.
- Added method
- Updates
DefaultAzureCredential
to enable authenticating through Visual Studio - Updates
DefaultAzureCredential
to enable authentication through Visual Studio Code
- Updating
DefaultAzureCredential
to enable authenticating through the Azure CLI ClientCertificateCredential
now supports being constructed with a path to an unencrypted certificate (in either PFX or PEM format)EnvironmentCredential
now supports reading a certificate path fromAZURE_CLIENT_CERTIFICATE_PATH
- Fix an issue where
EnvironmentCredential
did not behave correctly whenAZURE_USERNAME
andAZURE_PASSWORD
where set - Added
KnownAuthorityHosts
class to aid in sovereign cloud configuration.
- Fixed
UsernamePasswordCredential
constructor parameter mishandling - Updated
ManagedIdentityCredential
endpoint discovery to avoid throwing - Fixed
ManagedIdentityCredential
to raiseCredentialUnavailableException
on 400 return from the service where no identity has been assigned - Updated error messaging from
DefaultAzureCredential
to more easily root cause failures
- Update
SharedTokenCacheCredential
to filter accounts by tenant id- Added
SharedTokenCacheCredentialOptions
class with propertiesTenantId
andUsername
- Added constructor overload to
SharedTokenCacheCredential
which acceptsSharedTokenCacheCredentialOptions
- Added property
SharedTokenCacheTenantId
toDefaultAzureCredentialOptions
- Added
- Support for personal account authentication in
DefaultAzureCredential
,InteractiveBrowserCredential
, andSharedTokenCacheCredential
- Added
InteractiveBrowserTenantId
toDefaultAzureCredentialOptions
- Fixed issue with
ManagedIdentityCredential
authentication with user assigned identities
- First stable release of Azure.Identity package.
- Rename
AzureCredentialOptions
->TokenCredentialOptions
- Renamed property
VerificationUrl
->VerificationUri
and changed type fromstring
toUri
- Renamed property
- Updated
ClientSecretCredential
class- Removed property
ClientId
- Removed property
ClientSecret
- Removed property
TenantId
- Removed property
- Updated
ClientCertificateCredential
class- Removed property
ClientId
- Removed property
ClientCertificate
- Removed property
TenantId
- Removed property
- Updated
DefaultAzureCredential
class to derive directly fromTokenCredential
rather thanChainedTokenCredential
- Updated
DefaultAzureCredentialOptions
class- Renamed property
PreferredAccountUsername
->SharedTokenCacheUsername
- Renamed property
IncludeEnvironmentCredential
->ExcludeEnvironmentCredential
- Renamed property
IncludeManagedIdentityCredential
->ExcludeManagedIdentityCredential
- Renamed property
IncludeSharedTokenCacheCredential
->ExcludeSharedTokenCacheCredential
- Renamed property
IncludeInteractiveBrowserCredential
->ExcludeInteractiveBrowserCredential
- Renamed property
- Updated
DeviceCodeInfo
class- Removed property
Interval
- Renamed property
VerificationUrl
->VerificationUri
and changed type fromstring
toUri
- Removed property
- Updated
InteractiveBrowserCredential
class- Reordered constructor parameters
tenantId
andclientId
to be consistent with other credential types
- Reordered constructor parameters
- Updated
SharedTokenCacheCredential
class- Updated constructor to take
TokenCredentialOptions
- Removed
clientId
constructor parameter
- Updated constructor to take
- Removed class
SharedTokenCacheCredentialOptions
- Updated exception model across the Azure.Identity library.
TokenCredential
implementations in the Azure.Identity library now throw exceptions rather than returningdefault
(AccessToken
) when no token is obtained- Added the
CredentialUnavailableExcpetion
exception type to distinguish cases when failure to obtain anAccessToken
was expected
- Adopted Azure.Core 1.0.0
- Update
ManagedIdentityCredential
IMDS availability check to handle immediate network failures - Added a
DefaultAzureCredential
constructor overload to enable interactive credential types by default
- Adopted Azure.Core 1.0.0-preview.9
- Added
DefaultAzureCredentialOptions
for configuring theDefaultAzureCredential
authentication flow - Added
InteractiveBrowserCredential
to theDefaultAzureCredential
authentication flow, but excluded by default
- Updated
InteractiveBrowserCredential
andDeviceCodeCredential
to optionally accept a tenantId to support non-multitenant applications
- Modified GetToken abstraction to accept
TokenRequest
structure rather thanstring[]
for forwards compatibility
- Adopted Azure.Core 1.0.0-preview.8
- Added
SharedTokenCacheCredential
to support Single Sign On with developer tooling - Updated
DefaultAzureCredential
authentication flow to include theSharedTokenCacheCredential
- Adopted Azure.Core 1.0.0-preview.7
- Adopted Microsoft.Identity.Client 4.1.0
- User Principal Authentication
- Added
DeviceCodeCredential
class - Added
InteractiveBrowserCredential
class - Added
UsernamePasswordCredential
class
- 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
DefaultAzureCredential
class - Added
ChainedTokenCredential
class
- Added
- Service Principal Authentication
- Added
ClientSecretCredential
class - Added
ClientCertificateCredential
class
- Added
- Managed Identity Authentication
- Added
ManagedIdentityCredential
class
- Added
See the documentation for more details. User authentication will be added in an upcoming preview release.