You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/identity/azure-identity/README.md
+4-41Lines changed: 4 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,21 +81,7 @@ See [Credential classes](#credential-classes) for a complete list of available c
81
81
82
82
### DefaultAzureCredential
83
83
84
-
`DefaultAzureCredential` is appropriate for most scenarios where the application is intended to ultimately be run in Azure. This is because `DefaultAzureCredential` combines credentials commonly used to authenticate when deployed, with credentials used to authenticate in a development environment.
85
-
86
-
> Note: `DefaultAzureCredential` is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types.
87
-
88
-
`DefaultAzureCredential` attempts to authenticate via the following mechanisms in order:
1.**Environment** - `DefaultAzureCredential` reads account information specified via [environment variables](#environment-variables) and uses it to authenticate.
93
-
2.**Workload Identity** - If the app is deployed on Kubernetes with environment variables set by the workload identity webhook, `DefaultAzureCredential` authenticates the configured identity.
94
-
3.**Managed Identity** - If the app is deployed to an Azure host with Managed Identity enabled, `DefaultAzureCredential` authenticates with that account.
95
-
4.**Azure Developer CLI** - If the developer authenticated an account via the Azure Developer CLI `azd auth login` command, `DefaultAzureCredential` authenticates with that account.
96
-
5.**IntelliJ** - If the developer authenticated via Azure Toolkit for IntelliJ, `DefaultAzureCredential` authenticates with that account.
97
-
6.**Azure CLI** - If the developer authenticated an account via the Azure CLI `az login` command, `DefaultAzureCredential` authenticates with that account.
98
-
7.**Azure PowerShell** - If the developer authenticated an account via the Azure PowerShell `Connect-AzAccount` command, `DefaultAzureCredential` authenticates with that account.
84
+
`DefaultAzureCredential` simplifies authentication while developing apps that deploy to Azure by combining credentials used in Azure hosting environments with credentials used in local development. For more information, see [DefaultAzureCredential overview][dac_overview].
99
85
100
86
#### Continuation policy
101
87
@@ -131,8 +117,6 @@ public void createDefaultAzureCredential() {
131
117
}
132
118
```
133
119
134
-
For more information on configuring `DefaultAzureCredential` for your workstation or Azure, see [Configure DefaultAzureCredential](https://learn.microsoft.com/azure/developer/java/sdk/identity-azure-hosted-auth#default-azure-credential).
135
-
136
120
### Authenticate a user-assigned managed identity with `DefaultAzureCredential`
137
121
138
122
To authenticate using user-assigned managed identity, ensure that configuration instructions for your supported Azure resource [here](#managed-identity-support) have been successfully completed.
@@ -271,30 +255,7 @@ public void createManagedIdentityCredential() {
271
255
272
256
### Define a custom authentication flow with `ChainedTokenCredential`
273
257
274
-
While `DefaultAzureCredential` is generally the quickest way to get started developing apps for Azure, more advanced users may want to customize the credentials considered when authenticating. `ChainedTokenCredential` enables users to combine multiple credential instances to define a customized chain of credentials. This example demonstrates creating a `ChainedTokenCredential`, which will:
275
-
276
-
- Attempt to authenticate using managed identity.
277
-
- Fall back to authenticating via the Azure CLI if managed identity is unavailable in the current environment.
278
-
279
-
```java
280
-
// Authenticate using managed identity if it's available; otherwise use the Azure CLI to authenticate.
While `DefaultAzureCredential` is generally the quickest way to authenticate apps for Azure, you can create a customized chain of credentials to be considered. `ChainedTokenCredential` enables users to combine multiple credential instances to define a customized chain of credentials. For more information, see [ChainedTokenCredential overview][ctc_overview].
298
259
299
260
## Sovereign cloud configuration
300
261
@@ -491,6 +452,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
0 commit comments