View source: R/default-credential.R
| default_credential_chain | R Documentation |
Creates the default chain of credentials to attempt during authentication. The credentials are tried in order until one successfully authenticates. The default chain includes:
Client Secret Credential - Uses client ID and secret
Workload Identity Credential - Federated token, e.g. an AKS pod
Managed Identity Credential - The host's managed identity
Azure CLI Credential - Uses credentials from Azure CLI
Authorization Code Credential - Interactive browser-based authentication
Device Code Credential - Interactive device code flow
default_credential_chain()
A credential_chain object containing the default sequence of
credential providers.
AZURE_TOKEN_CREDENTIALSLike DefaultAzureCredential in the Azure SDKs, the chain honours the
AZURE_TOKEN_CREDENTIALS environment variable, read each time the chain is
built. Matching is case-insensitive:
| Value | Entries kept |
"dev" | azure_cli, auth_code, device_code |
"prod" | client_secret, workload_identity, managed_identity |
"EnvironmentCredential" or "ClientSecretCredential" | client_secret |
"WorkloadIdentityCredential" | workload_identity |
"ManagedIdentityCredential" | managed_identity |
"AzureCliCredential" | azure_cli |
"InteractiveBrowserCredential" or "AuthCodeCredential" | auth_code |
"DeviceCodeCredential" | device_code |
Setting "dev" is how to keep a person's Azure CLI login from losing to a
workload or managed identity the host also offers. Unset or empty keeps the
whole chain. Any other value is an error, including the Azure SDK names for
credentials azr does not implement (AzureDeveloperCliCredential,
AzurePowerShellCredential, VisualStudioCodeCredential). Chains built
with credential_chain() are never filtered.
credential_chain(), get_token_provider()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.