sdk/identity/Azure.Identity/BREAKING_CHANGES.md
DefaultAzureCredential in IMDS managed identity scenariosAs of Azure.Identity 1.11.0, the DefaultAzureCredential makes a couple minor behavioral changes to request timeout and retry behavior in environments where IMDS managed identity is used. The changes are as follows:
If more retries are needed for IMDS managed identity scenarios, a custom RetryPolicy can be specified in the DefaultAzureCredentialOptions. More information on how to customize the retry policy can be found here.
As of Azure.Identity 1.7.0, the default behavior of credentials supporting multi-tenant authentication has changed. Each of these credentials will throw an AuthenticationFailedException if the requested TenantId doesn't match the tenant ID originally configured on the credential. Apps must now do one of the following things:
AdditionallyAllowedTenants list in the credential options. For example:var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "<tenant_id_1>", "<tenant_id_2>" }
});
* to enable token acquisition from any tenant. This is the original behavior and is compatible with previous versions supporting multi tenant authentication. For example:var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "*" }
});
Note: Credential types which do not require a TenantId on construction will only throw AuthenticationFailedException when the application has provided a value for TenantId either in the options or via a constructor overload. If no TenantId is specified when constructing the credential, the credential will acquire tokens for any requested TenantId regardless of the value of AdditionallyAllowedTenants.
More information on this change and the consideration behind it can be found here.
ExcludeSharedTokenCacheCredential default value from false to true on DefaultAzureCredentialsOptionsStarting in Azure.Identity 1.4.0-beta.4 the default value of the ExcludeSharedTokenCacheCredential property on DefaultAzureCredentialsOptions has changed from false to true, excluding the SharedTokenCacheCredential from the DefaultAzureCredential authentication flow by default. We expect that few users will be impacted by this change as the VisualStudioCredential has effectively replaced the SharedTokenCacheCredential in this authentication flow. However, users who find this change does negatively impact them can still invoke the old behavior by explicitly setting the value to false.
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
ExcludeSharedTokenCacheCredential = false
});
More information on this change and the consideration behind it can be found here.