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
**Summary of changes**
- Add API ref links for the workload identity and azd credentials
- Alphabetize table rows for dev tool credentials
- Switch from `require` to `import` in code samples
// Azure SDK clients accept the credential as a parameter
170
170
constcredential=newDefaultAzureCredential();
@@ -181,8 +181,8 @@ A relatively common scenario involves authenticating using a user-assigned manag
181
181
182
182
While the `DefaultAzureCredential` is generally the quickest way to get started developing applications for Azure, more advanced users may want to customize the credentials considered when authenticating. The `ChainedTokenCredential` enables users to combine multiple credential instances to define a customized chain of credentials. This example demonstrates creating a `ChainedTokenCredential` which will attempt to authenticate using two differently configured instances of `ClientSecretCredential`, to then authenticate the `KeyClient` from the [@azure/keyvault-keys](https://www.npmjs.com/package/@azure/keyvault-keys):
@@ -213,7 +213,7 @@ For examples of how to use managed identity for authentication, see [the example
213
213
214
214
Credentials default to authenticating to the Azure AD endpoint for Azure Public Cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `authorityHost` argument in the constructor. The `AzureAuthorityHosts` interface defines authorities for well-known clouds. For the US Government cloud, you could instantiate a credential this way:
|[`EnvironmentCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/environmentcredential?view=azure-node-latest)| Authenticates a service principal or user via credential information specified in environment variables. |[example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-service-principal-with-environment-credentials)|
239
239
|[`ManagedIdentityCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/managedidentitycredential?view=azure-node-latest)| Authenticates the managed identity of an Azure resource. |[example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-in-azure-with-managed-identity)|
240
-
|`WorkloadIdentityCredential`| Supports [Azure AD workload identity](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes. ||
240
+
|[`WorkloadIdentityCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/workloadidentitycredential?view=azure-node-latest)| Supports [Azure AD workload identity](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes. ||
241
241
242
242
### Authenticate service principals
243
243
@@ -261,8 +261,8 @@ Not all credentials require this configuration. Credentials that authenticate th
|`AzureDeveloperCliCredential`| Authenticate in a development environment with the enabled user or service principal in Azure Developer CLI. ||[Azure Developer CLI Reference](https://learn.microsoft.com/azure/developer/azure-developer-cli/reference)|
265
264
|[`AzureCliCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/azureclicredential?view=azure-node-latest)| Authenticate in a development environment with the Azure CLI. |[example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-user-account-with-azure-cli)|[Azure CLI authentication](https://learn.microsoft.com/cli/azure/authenticate-azure-cli)|
265
+
|[`AzureDeveloperCliCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/azuredeveloperclicredential?view=azure-node-latest)| Authenticate in a development environment with the enabled user or service principal in Azure Developer CLI. ||[Azure Developer CLI Reference](https://learn.microsoft.com/azure/developer/azure-developer-cli/reference)|
266
266
|[`AzurePowerShellCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/azurepowershellcredential?view=azure-node-latest)| Authenticate in a development environment using Azure PowerShell. |[example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-user-account-with-azure-powershell)|[Azure PowerShell authentication](https://learn.microsoft.com/powershell/azure/authenticate-azureps)|
267
267
| [`VisualStudioCodeCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/visualstudiocodecredential?view=azure-node-latest) | Authenticates as the user signed in to the Visual Studio Code Azure Account extension.| | [VS Code Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account)
268
268
@@ -299,7 +299,9 @@ Not all credentials require this configuration. Credentials that authenticate th
299
299
Configuration is attempted in the above order. For example, if values for a client secret and certificate are both present, the client secret will be used.
300
300
301
301
## Token caching
302
+
302
303
Token caching is a feature provided by the Azure Identity library that allows apps to:
304
+
303
305
- Cache tokens in memory (default) and on disk (opt-in).
304
306
- Improve resilience and performance.
305
307
- Reduce the number of requests made to Azure AD to obtain access tokens.
0 commit comments