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
@@ -30,19 +30,10 @@ Azure services are accessed using specialized client classes from the various Az
30
30
31
31
1. Include the `Azure.Identity` and `Microsoft.Extensions.Azure` namespaces via `using` directives.
32
32
1. Register the Azure service client using the corresponding `Add`-prefixed extension method.
33
-
1.Pass an appropriate `TokenCredential` instance to the `UseCredential` method:
34
-
-Use `DefaultAzureCredential` when your app is running locally.
35
-
-Use `ManagedIdentityCredential` when your app is running in Azure.
33
+
1.Use an appropriate `TokenCredential` instance for the environment in which your app is running. When your app is running:
34
+
-In Azure, pass an instance of `ManagedIdentityCredential` to the `UseCredential` method. `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
35
+
-On your local development machine, an instance of `DefaultAzureCredential` is created on your behalf. Call `UseCredential` only if you want to [customize `DefaultAzureCredential`](../authentication/credential-chains.md#how-to-customize-defaultazurecredential) or use a different credential. `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
The preceding code behaves differently depending on the environment where it's running:
46
-
47
-
- On your local development workstation, `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
48
-
- When deployed to Azure, `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
@@ -30,9 +30,9 @@ Azure services are accessed using specialized client classes from the various Az
30
30
31
31
1. Include the `Azure.Identity` and `Microsoft.Extensions.Azure` namespaces via `using` directives.
32
32
1. Register the Azure service client using the corresponding `Add`-prefixed extension method.
33
-
1.Pass an appropriate `TokenCredential` instance to the `UseCredential` method:
34
-
-Use `DefaultAzureCredential` when your app is running locally
35
-
-Use `ManagedIdentityCredential` when your app is running in Azure and configure either the client ID, resource ID, or object ID.
33
+
1.Use an appropriate `TokenCredential` instance for the environment in which your app is running. When your app is running:
34
+
-In Azure, pass an instance of `ManagedIdentityCredential` to the `UseCredential` method and configure either the client ID, resource ID, or object ID. `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
35
+
-On your local development machine, an instance of `DefaultAzureCredential` is created on your behalf. Call `UseCredential` only if you want to [customize `DefaultAzureCredential`](../authentication/credential-chains.md#how-to-customize-defaultazurecredential) or use a different credential. `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
36
36
37
37
## [Client ID](#tab/client-id)
38
38
@@ -51,10 +51,6 @@ The client ID is used to identify a managed identity when configuring applicatio
The preceding code behaves differently depending on the environment where it's running:
107
-
108
-
- On your local development workstation, `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
109
-
- When deployed to Azure, `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
0 commit comments