Skip to content

Commit 18820ed

Browse files
committed
Update docs metadata
1 parent 573896c commit 18820ed

File tree

2 files changed

+52
-46
lines changed

2 files changed

+52
-46
lines changed

docs-ref-services/latest/identity-readme.md

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
title: Azure Identity client library for Python
3-
keywords: Azure, python, SDK, API, azure-identity, identity
4-
ms.date: 09/19/2024
3+
keywords: Azure, python, SDK, API, azure-identity, entra-id
4+
ms.date: 10/08/2024
55
ms.topic: reference
66
ms.devlang: python
7-
ms.service: identity
7+
ms.service: entra-id
88
---
9-
# Azure Identity client library for Python - version 1.18.0
9+
# Azure Identity client library for Python - version 1.19.0
1010

1111

1212
The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/entra/fundamentals/whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/entra/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`][token_cred_ref]/[`SupportsTokenInfo`][supports_token_info_ref] implementations, which can be used to construct Azure SDK clients that support Microsoft Entra token authentication.
1313

14-
[Source code](https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/identity/azure-identity)
14+
[Source code](https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/identity/azure-identity)
1515
| [Package (PyPI)](https://pypi.org/project/azure-identity/)
1616
| [Package (Conda)](https://anaconda.org/microsoft/azure-identity/)
1717
| [API reference documentation][ref_docs]
@@ -68,21 +68,7 @@ The Azure Identity library focuses on OAuth authentication with Microsoft Entra
6868

6969
### DefaultAzureCredential
7070

71-
`DefaultAzureCredential` is appropriate for most applications that will run in Azure because it combines common production credentials with development credentials. `DefaultAzureCredential` attempts to authenticate via the following mechanisms, in this order, stopping when one succeeds:
72-
73-
>Note: `DefaultAzureCredential` is intended to simplify getting started with the library by handling common
74-
>scenarios with reasonable default behaviors. Developers who want more control or whose scenario
75-
>isn't served by the default settings should use other credential types.
76-
77-
![DefaultAzureCredential authentication flow](https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/identity/azure-identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg)
78-
79-
1. **Environment** - `DefaultAzureCredential` reads account information specified via [environment variables](#environment-variables "environment variables") and uses it to authenticate.
80-
1. **Workload Identity** - If the application is deployed to Azure Kubernetes Service with Managed Identity enabled, `DefaultAzureCredential` authenticates with it.
81-
1. **Managed Identity** - If the application is deployed to an Azure host with Managed Identity enabled, `DefaultAzureCredential` authenticates with it.
82-
1. **Azure CLI** - If a user signed in via the Azure CLI `az login` command, `DefaultAzureCredential` authenticates as that user.
83-
1. **Azure PowerShell** - If a user signed in via Azure PowerShell's `Connect-AzAccount` command, `DefaultAzureCredential` authenticates as that user.
84-
1. **Azure Developer CLI** - If the developer authenticated via the Azure Developer CLI `azd auth login` command, `DefaultAzureCredential` authenticates with that account.
85-
1. **Interactive browser** - If enabled, `DefaultAzureCredential` interactively authenticates a user via the default browser. This credential type is disabled by default.
71+
`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].
8672

8773
#### Continuation policy
8874

@@ -127,7 +113,7 @@ DefaultAzureCredential(exclude_interactive_browser_credential=False)
127113

128114
When enabled, `DefaultAzureCredential` falls back to interactively authenticating via the system's default web browser when no other credential is available.
129115

130-
#### Specify a user-assigned managed identity for `DefaultAzureCredential`
116+
#### Specify a user-assigned managed identity with `DefaultAzureCredential`
131117

132118
Many Azure hosts allow the assignment of a user-assigned managed identity. To configure `DefaultAzureCredential` to authenticate a user-assigned managed identity, use the `managed_identity_client_id` keyword argument:
133119

@@ -139,20 +125,7 @@ Alternatively, set the environment variable `AZURE_CLIENT_ID` to the identity's
139125

140126
### Define a custom authentication flow with `ChainedTokenCredential`
141127

142-
`DefaultAzureCredential` is generally the quickest way to get started developing applications for Azure. For more advanced scenarios, [ChainedTokenCredential][chain_cred_ref] links multiple credential instances to be tried sequentially when authenticating. It tries each credential in turn until one provides a token or fails to authenticate due to an error.
143-
144-
The following example demonstrates creating a credential that first attempts to authenticate using managed identity. The credential falls back to authenticating via the Azure CLI when a managed identity is unavailable. This example uses the `EventHubProducerClient` from the [azure-eventhub][azure_eventhub] client library.
145-
146-
```python
147-
from azure.eventhub import EventHubProducerClient
148-
from azure.identity import AzureCliCredential, ChainedTokenCredential, ManagedIdentityCredential
149-
150-
managed_identity = ManagedIdentityCredential()
151-
azure_cli = AzureCliCredential()
152-
credential_chain = ChainedTokenCredential(managed_identity, azure_cli)
153-
154-
client = EventHubProducerClient(namespace, eventhub_name, credential_chain)
155-
```
128+
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].
156129

157130
### Async credentials
158131

@@ -198,13 +171,42 @@ client = SecretClient("https://my-vault.vault.azure.net", default_credential)
198171

199172
### Examples
200173

174+
These examples demonstrate authenticating `SecretClient` from the [`azure-keyvault-secrets`](https://github.com/Azure/azure-sdk-for-python/tree/azure-identity_1.19.0/sdk/keyvault/azure-keyvault-secrets) library with `ManagedIdentityCredential`.
175+
176+
201177
#### Authenticate with a user-assigned managed identity
202178

179+
To authenticate with a user-assigned managed identity, you must specify one of the following IDs for the managed identity.
180+
181+
##### Client ID
182+
183+
```python
184+
from azure.identity import ManagedIdentityCredential
185+
from azure.keyvault.secrets import SecretClient
186+
187+
credential = ManagedIdentityCredential(client_id="managed_identity_client_id")
188+
client = SecretClient("https://my-vault.vault.azure.net", credential)
189+
```
190+
191+
##### Resource ID
192+
193+
```python
194+
from azure.identity import ManagedIdentityCredential
195+
from azure.keyvault.secrets import SecretClient
196+
197+
resource_id = "/subscriptions/<id>/resourceGroups/<rg>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<mi-name>"
198+
199+
credential = ManagedIdentityCredential(identity_config={"resource_id": resource_id})
200+
client = SecretClient("https://my-vault.vault.azure.net", credential)
201+
```
202+
203+
##### Object ID
204+
203205
```python
204206
from azure.identity import ManagedIdentityCredential
205207
from azure.keyvault.secrets import SecretClient
206208

207-
credential = ManagedIdentityCredential(client_id=managed_identity_client_id)
209+
credential = ManagedIdentityCredential(identity_config={"object_id": "managed_identity_object_id"})
208210
client = SecretClient("https://my-vault.vault.azure.net", credential)
209211
```
210212

@@ -331,7 +333,7 @@ Token caching is a feature provided by the Azure Identity library that allows ap
331333
- Improve resilience and performance.
332334
- Reduce the number of requests made to Microsoft Entra ID to obtain access tokens.
333335

334-
The Azure Identity library offers both in-memory and persistent disk caching. For more information, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/identity/azure-identity/TOKEN_CACHING.md).
336+
The Azure Identity library offers both in-memory and persistent disk caching. For more information, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/identity/azure-identity/TOKEN_CACHING.md).
335337

336338
## Brokered authentication
337339

@@ -391,19 +393,21 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
391393
[azd_cli_cred_ref]: https://aka.ms/azsdk/python/identity/azuredeveloperclicredential
392394
[azure_cli]: https://learn.microsoft.com/cli/azure
393395
[azure_developer_cli]:https://aka.ms/azure-dev
394-
[azure_core_transport_doc]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport
396+
[azure_core_transport_doc]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport
395397
[azure_identity_broker]: https://pypi.org/project/azure-identity-broker
396-
[azure_identity_broker_readme]: https://github.com/Azure/azure-sdk-for-python/tree/azure-identity_1.18.0/sdk/identity/azure-identity-broker
397-
[azure_eventhub]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/eventhub/azure-eventhub
398-
[azure_keyvault_secrets]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/keyvault/azure-keyvault-secrets
399-
[azure_storage_blob]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/storage/azure-storage-blob
398+
[azure_identity_broker_readme]: https://github.com/Azure/azure-sdk-for-python/tree/azure-identity_1.19.0/sdk/identity/azure-identity-broker
399+
[azure_eventhub]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/eventhub/azure-eventhub
400+
[azure_keyvault_secrets]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/keyvault/azure-keyvault-secrets
401+
[azure_storage_blob]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/storage/azure-storage-blob
400402
[b2c]: https://learn.microsoft.com/azure/active-directory-b2c/overview
401403
[cae]: https://learn.microsoft.com/entra/identity/conditional-access/concept-continuous-access-evaluation
402404
[cert_cred_ref]: https://aka.ms/azsdk/python/identity/certificatecredential
403405
[chain_cred_ref]: https://aka.ms/azsdk/python/identity/chainedtokencredential
404406
[cli_cred_ref]: https://aka.ms/azsdk/python/identity/azclicredential
405407
[client_assertion_cred_ref]: https://aka.ms/azsdk/python/identity/clientassertioncredential
406408
[client_secret_cred_ref]: https://aka.ms/azsdk/python/identity/clientsecretcredential
409+
[ctc_overview]: https://aka.ms/azsdk/python/identity/credential-chains#chainedtokencredential-overview
410+
[dac_overview]: https://aka.ms/azsdk/python/identity/credential-chains#defaultazurecredential-overview
407411
[default_cred_ref]: https://aka.ms/azsdk/python/identity/defaultazurecredential
408412
[device_code_cred_ref]: https://aka.ms/azsdk/python/identity/devicecodecredential
409413
[environment_cred_ref]: https://aka.ms/azsdk/python/identity/environmentcredential
@@ -415,7 +419,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
415419
[ref_docs_aio]: https://aka.ms/azsdk/python/identity/aio/docs
416420
[token_cred_ref]: https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python
417421
[supports_token_info_ref]: https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.supportstokeninfo?view=azure-python
418-
[troubleshooting_guide]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.18.0/sdk/identity/azure-identity/TROUBLESHOOTING.md
422+
[troubleshooting_guide]: https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.19.0/sdk/identity/azure-identity/TROUBLESHOOTING.md
419423
[userpass_cred_ref]: https://aka.ms/azsdk/python/identity/usernamepasswordcredential
420424
[vscode_cred_ref]: https://aka.ms/azsdk/python/identity/vscodecredential
421425
[workload_id_cred_ref]: https://aka.ms/azsdk/python/identity/workloadidentitycredential

metadata/latest/azure-identity.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "azure-identity",
3-
"Version": "1.18.0",
3+
"Version": "1.19.0",
44
"DevVersion": null,
55
"DirectoryPath": "sdk/identity/azure-identity",
66
"ServiceDirectory": "identity",
@@ -10,9 +10,11 @@
1010
"SdkType": "client",
1111
"IsNewSdk": true,
1212
"ArtifactName": "azure-identity",
13-
"ReleaseStatus": "2024-09-19",
13+
"ReleaseStatus": "2024-10-08",
1414
"IncludedForValidation": false,
15-
"AdditionalValidationPackages": null,
15+
"AdditionalValidationPackages": [
16+
""
17+
],
1618
"Namespaces": [
1719
"azure.identity"
1820
],

0 commit comments

Comments
 (0)