A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential below:

azure.identity.DefaultAzureCredential class | Microsoft Learn

DefaultAzureCredential Class

A credential capable of handling most Azure SDK authentication scenarios. For more information, See Usage guidance for DefaultAzureCredential.

The identity it uses depends on the environment. When an access token is needed, it requests one using these identities in turn, stopping when one provides a token:

  1. A service principal configured by environment variables. See EnvironmentCredential for more details.

  2. WorkloadIdentityCredential if environment variable configuration is set by the Azure workload identity webhook.

  3. An Azure managed identity. See ManagedIdentityCredential for more details.

  4. On Windows only: a user who has signed in with a Microsoft application, such as Visual Studio. If multiple identities are in the cache, then the value of the environment variable AZURE_USERNAME is used to select which identity to use. See SharedTokenCacheCredential for more details.

  5. The identity currently logged in to the Azure CLI.

  6. The identity currently logged in to Azure PowerShell.

  7. The identity currently logged in to the Azure Developer CLI.

  8. Brokered authentication. On Windows and WSL only, this uses the default account logged in via Web Account Manager (WAM) if the azure-identity-broker package is installed.

This default behavior is configurable with keyword arguments.

Constructor
DefaultAzureCredential(**kwargs: Any)
Keyword-Only Parameters Examples

Create a DefaultAzureCredential.


   from azure.identity import DefaultAzureCredential

   credential = DefaultAzureCredential()

Methods close

Close the transport session of each credential in the chain.

get_token

Request an access token for scopes.

This method is called automatically by Azure SDK clients.

get_token_info

Request an access token for scopes.

This is an alternative to get_token to enable certain scenarios that require additional properties on the token. This method is called automatically by Azure SDK clients.

close

Close the transport session of each credential in the chain.

close() -> None
get_token

Request an access token for scopes.

This method is called automatically by Azure SDK clients.

get_token(*scopes: str, claims: str | None = None, tenant_id: str | None = None, **kwargs: Any) -> AccessToken
Parameters Keyword-Only Parameters Returns Exceptions get_token_info

Request an access token for scopes.

This is an alternative to get_token to enable certain scenarios that require additional properties on the token. This method is called automatically by Azure SDK clients.

get_token_info(*scopes: str, options: TokenRequestOptions | None = None) -> AccessTokenInfo
Parameters Keyword-Only Parameters Returns Exceptions

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4