File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
sdk/identity/azure-identity Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,22 @@ default_credential = DefaultAzureCredential()
220220client = SecretClient(" https://my-vault.vault.azure.net" , default_credential)
221221```
222222
223+ ## Cloud Configuration
224+ Credentials default to authenticating to the Azure Active Directory endpoint for
225+ Azure Public Cloud. To access resources in other clouds, such as Azure Government
226+ or a private cloud, configure credentials with the ` authority ` argument.
227+ [ AzureAuthorityHosts] ( https://aka.ms/azsdk/python/identity/docs#azure.identity.AzureAuthorityHosts )
228+ defines authorities for well-known clouds:
229+ ``` py
230+ from azure.identity import AzureAuthorityHosts
231+
232+ DefaultAzureCredential(authority = AzureAuthorityHosts.AZURE_GOVERNMENT )
233+ ```
234+ Not all credentials require this configuration. Credentials which authenticate
235+ through a development tool, such as ` AzureCliCredential ` , use that tool's
236+ configuration. Similarly, ` VisualStudioCodeCredential ` accepts an ` authority `
237+ argument but defaults to the authority matching VS Code's "Azure: Cloud" setting.
238+
223239## Credential Classes
224240
225241### Authenticating Azure Hosted Applications
You can’t perform that action at this time.
0 commit comments