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
Document new MI as FIC feature in Microsoft.Extensions.Azure (#46811)
* Document new MI as FIC feature in Microsoft.Extensions.Azure
* Add missing word
* Update docs/azure/sdk/authentication/create-token-credentials-from-configuration.md
Co-authored-by: Christopher Scott <[email protected]>
* Update docs/azure/sdk/authentication/create-token-credentials-from-configuration.md
Co-authored-by: Christopher Scott <[email protected]>
---------
Co-authored-by: Christopher Scott <[email protected]>
description: Learn how to create token credentials from configuration files.
4
4
ms.topic: how-to
5
5
ms.custom: devx-track-dotnet, engagement-fy23
6
-
ms.date: 03/14/2025
6
+
ms.date: 06/13/2025
7
7
---
8
8
9
9
# Create Azure Identity library credentials via configuration files
@@ -67,9 +67,23 @@ Add the wildcard value `*` to allow the credential to acquire tokens for any Mic
67
67
68
68
### Create an instance of `ManagedIdentityCredential`
69
69
70
-
You can create both user-assigned and system-assigned managed identities using configuration values. To create an instance of <xref:Azure.Identity.ManagedIdentityCredential?displayProperty=fullName>, add the following key-value pairs to your _appsettings.json_ file.
70
+
You can configure a credential to utilize a managed identity in the following ways using configuration values:
71
71
72
-
#### User-assigned managed identities
72
+
- System-assigned managed identity
73
+
- User-assigned managed identity
74
+
- Managed identity as a federated identity credential
75
+
76
+
To create an instance of <xref:Azure.Identity.ManagedIdentityCredential?displayProperty=fullName>, add the following key-value pairs to your _appsettings.json_ file.
77
+
78
+
#### System-assigned managed identity
79
+
80
+
```json
81
+
{
82
+
"credential": "managedidentity"
83
+
}
84
+
```
85
+
86
+
#### User-assigned managed identity
73
87
74
88
A user-assigned managed identity can be used by providing a client ID, resource ID, or object ID.
75
89
@@ -78,7 +92,7 @@ A user-assigned managed identity can be used by providing a client ID, resource
@@ -108,14 +122,57 @@ The resource ID takes the form:
108
122
109
123
---
110
124
111
-
#### System-assigned managed identities
125
+
#### Managed identity as a federated identity credential
126
+
127
+
The [managed identity as a federated identity credential](/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity?tabs=microsoft-entra-admin-center%2Cdotnet) feature is supported in `Microsoft.Extensions.Azure` versions 1.12.0 and later. The feature doesn't work with system-assigned managed identity. The credential can be configured with a user-assigned managed identity by providing a client ID, resource ID, or object ID.
The `azureCloud` key value is used to set the Microsoft Entra access token scope. It can be one of the following values:
171
+
172
+
-`public` for Azure Public Cloud
173
+
-`usgov` for Azure US Government Cloud
174
+
-`china` for Azure operated by 21Vianet
175
+
119
176
### Create an instance of `AzurePipelinesCredential`
120
177
121
178
To create an instance of <xref:Azure.Identity.AzurePipelinesCredential?displayProperty=fullName>, add the following key-value pairs to your _appsettings.json_ file:
0 commit comments