<PackageReference Include="Azure.Core" Version="1.53.0" />

Azure.Identity.DefaultAzureCredential

Simplifies authentication while developing apps that deploy to Azure by combining credentials used in Azure hosting environments with credentials used in local development. In production, it's better to use something else. See Usage guidance for DefaultAzureCredential. Attempts to authenticate with each of these credentials, in the following order, stopping when one provides a token: EnvironmentCredential WorkloadIdentityCredential ManagedIdentityCredential VisualStudioCredential VisualStudioCodeCredential (enabled by default for SSO with VS Code on supported platforms when Azure.Identity.Broker is installed) AzureCliCredential AzurePowerShellCredential AzureDeveloperCliCredential InteractiveBrowserCredentialBrokerCredential (a broker-enabled instance of InteractiveBrowserCredential that requires Azure.Identity.Broker is installed) Consult the documentation of these credentials for more information on how they attempt authentication.
public const string DefaultEnvironmentVariableName = "AZURE_TOKEN_CREDENTIALS"

The default environment variable name used for token credential configuration.

Protected constructor for mocking.

public DefaultAzureCredential(bool includeInteractiveCredentials = false)

Creates an instance of the DefaultAzureCredential class.

Creates an instance of the DefaultAzureCredential class.

public DefaultAzureCredential(string configurationEnvironmentVariableName, DefaultAzureCredentialOptions options = null)

Creates an instance of the DefaultAzureCredential class that reads credential configuration from a specified environment variable.