Skip to content

Commit af88f64

Browse files
Replace azure-identity AAD references (#32461)
* Replace azure-identity AAD references * React to feedback * updates * update --------- Co-authored-by: xiangyan99 <xiangsjtu@gmail.com>
1 parent eb22d09 commit af88f64

51 files changed

Lines changed: 180 additions & 185 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
"ekus",
209209
"encryptor",
210210
"engsys",
211+
"entra",
211212
"envname",
212213
"evals",
213214
"fileno",

sdk/identity/azure-identity-broker/azure/identity/broker/_browser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
class InteractiveBrowserBrokerCredential(_InteractiveBrowserCredential):
1919
"""Opens a browser to interactively authenticate a user.
2020
21-
:func:`~get_token` opens a browser to a login URL provided by Azure Active Directory and authenticates a user
21+
:func:`~get_token` opens a browser to a login URL provided by Microsoft Entra ID and authenticates a user
2222
there with the authorization code flow, using PKCE (Proof Key for Code Exchange) internally to protect the code.
2323
24-
:keyword str authority: Authority of an Azure Active Directory endpoint, for example "login.microsoftonline.com",
24+
:keyword str authority: Authority of a Microsoft Entra endpoint, for example "login.microsoftonline.com",
2525
the authority for Azure Public Cloud (which is the default). :class:`~azure.identity.AzureAuthorityHosts`
2626
defines authorities for other clouds.
27-
:keyword str tenant_id: an Azure Active Directory tenant ID. Defaults to the "organizations" tenant, which can
27+
:keyword str tenant_id: a Microsoft Entra tenant ID. Defaults to the "organizations" tenant, which can
2828
authenticate work or school accounts.
29-
:keyword str client_id: Client ID of the Azure Active Directory application users will sign in to. If
29+
:keyword str client_id: Client ID of the Microsoft Entra application users will sign in to. If
3030
unspecified, users will authenticate to an Azure development application.
3131
:keyword str login_hint: a username suggestion to pre-fill the login page's username/email address field. A user
3232
may still log in with a different username.
33-
:keyword str redirect_uri: a redirect URI for the application identified by `client_id` as configured in Azure
34-
Active Directory, for example "http://localhost:8400". This is only required when passing a value for
33+
:keyword str redirect_uri: a redirect URI for the application identified by `client_id` as configured in Microsoft
34+
Entra ID, for example "http://localhost:8400". This is only required when passing a value for
3535
**client_id**, and must match a redirect URI in the application's registration. The credential must be able to
3636
bind a socket to this URI.
3737
:keyword AuthenticationRecord authentication_record: :class:`AuthenticationRecord` returned by :func:`authenticate`

sdk/identity/azure-identity-broker/azure/identity/broker/_user_password.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ class UsernamePasswordBrokerCredential(_UsernamePasswordCredential):
2121
a directory admin.
2222
2323
This credential can only authenticate work and school accounts; Microsoft accounts are not supported.
24-
See `Azure Active Directory documentation
25-
<https://docs.microsoft.com/azure/active-directory/fundamentals/sign-up-organization>`_ for more information about
24+
See `Microsoft Entra ID documentation
25+
<https://learn.microsoft.com/azure/active-directory/fundamentals/sign-up-organization>`_ for more information about
2626
account types.
2727
2828
:param str client_id: The application's client ID
2929
:param str username: The user's username (usually an email address)
3030
:param str password: The user's password
3131
32-
:keyword str authority: Authority of an Azure Active Directory endpoint, for example "login.microsoftonline.com",
32+
:keyword str authority: Authority of a Microsoft Entra endpoint, for example "login.microsoftonline.com",
3333
the authority for Azure Public Cloud (which is the default). :class:`~azure.identity.AzureAuthorityHosts`
3434
defines authorities for other clouds.
3535
:keyword str tenant_id: Tenant ID or a domain associated with a tenant. If not provided, defaults to the
36-
"organizations" tenant, which supports only Azure Active Directory work or school accounts.
36+
"organizations" tenant, which supports only Microsoft Entra work or school accounts.
3737
:keyword cache_persistence_options: Configuration for persistent token caching. If unspecified, the credential
3838
will cache tokens in memory.
3939
:paramtype cache_persistence_options: ~azure.identity.TokenCachePersistenceOptions

sdk/identity/azure-identity/CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
### Features Added
2828

2929
- Added Windows Web Account Manager (WAM) Brokered Authentication support.
30-
- Added `enable_msa_passthrough` suppport for `InteractiveBrowserCredential`. By default `InteractiveBrowserCredential` only lists AAD accounts. If you set `enable_msa_passthrough` to `True`, it lists both AAD accounts and MSA outlook.com accounts that are logged in to Windows.
30+
- Added `enable_msa_passthrough` suppport for `InteractiveBrowserCredential`. By default `InteractiveBrowserCredential` only lists Microsoft Entra accounts. If you set `enable_msa_passthrough` to `True`, it lists both Microsoft Entra accounts and MSA outlook.com accounts that are logged in to Windows.
3131

3232
### Bugs Fixed
3333

@@ -40,7 +40,7 @@
4040

4141
- Update typing of async credentials to match the `AsyncTokenCredential` protocol.
4242
- If within `DefaultAzureCredential`, `EnvironmentCredential` will now use log level INFO instead of WARNING to inform users of an incomplete environment configuration. ([#31814](https://github.com/Azure/azure-sdk-for-python/pull/31814))
43-
- Strengthened `AzureCliCredential` and `AzureDeveloperCliCredential` error checking when determining if a user is logged in or not. Now, if an AADSTS error exists in the error, the full error message is propagated instead of a canned error message. ([#30047](https://github.com/Azure/azure-sdk-for-python/pull/30047))
43+
- Strengthened `AzureCliCredential` and `AzureDeveloperCliCredential` error checking when determining if a user is logged in or not. Now, if an `AADSTS` error exists in the error, the full error message is propagated instead of a canned error message. ([#30047](https://github.com/Azure/azure-sdk-for-python/pull/30047))
4444
- `ManagedIdentityCredential` instances using IMDS will now be allowed to continue sending requests to the IMDS endpoint even after previous attempts failed. This is to prevent credential instances from potentially being permanently disabled after a temporary network failure.
4545
- IMDS endpoint probes in `ManagedIdentityCredential` will now only occur when inside a credential chain such as `DefaultAzureCredential`. This probe request timeout has been increased to 1 second from 0.3 seconds to reduce the likelihood of false negatives.
4646

@@ -98,7 +98,7 @@
9898
### Features Added
9999

100100
- Changed parameter from `instance_discovery` to `disable_instance_discovery` to make it more explicit.
101-
- Service principal credentials now enable support for [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation-workload). This indicates to Azure Active Directory that your application can handle CAE claims challenges.
101+
- Service principal credentials now enable support for [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation-workload). This indicates to Microsoft Entra ID that your application can handle CAE claims challenges.
102102

103103
## 1.13.0b2 (2023-02-07)
104104

@@ -826,8 +826,8 @@ its use in national clouds
826826
## 1.0.0b4 (2019-10-07)
827827
### New features:
828828
- `AuthorizationCodeCredential` authenticates with a previously obtained
829-
authorization code. See Azure Active Directory's
830-
[authorization code documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow)
829+
authorization code. See Microsoft Entra's
830+
[authorization code documentation](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow)
831831
for more information about this authentication flow.
832832
- Multi-cloud support: client credentials accept the authority of an Azure Active
833833
Directory authentication endpoint as an `authority` keyword argument. Known
@@ -899,5 +899,5 @@ See the
899899
for more details. User authentication will be added in an upcoming preview
900900
release.
901901
902-
This release supports only global Azure Active Directory tenants, i.e. those
902+
This release supports only global Microsoft Entra tenants, i.e. those
903903
using the https://login.microsoftonline.com authentication endpoint.

sdk/identity/azure-identity/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Azure Identity client library for Python
22

3-
The Azure Identity library provides [Azure Active Directory (Azure AD)](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python) implementations, which can be used to construct Azure SDK clients that support Azure AD token authentication.
3+
The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python) implementations, which can be used to construct Azure SDK clients that support Microsoft Entra token authentication.
44

55
[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity)
66
| [Package (PyPI)](https://pypi.org/project/azure-identity/)
77
| [Package (Conda)](https://anaconda.org/microsoft/azure-identity/)
88
| [API reference documentation][ref_docs]
9-
| [Azure AD documentation](https://learn.microsoft.com/azure/active-directory/)
9+
| [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/)
1010

1111
## Getting started
1212

@@ -55,7 +55,7 @@ For systems without a default web browser, the `azd auth login --use-device-code
5555

5656
A credential is a class that contains or can obtain the data needed for a service client to authenticate requests. Service clients across the Azure SDK accept a credential instance when they're constructed, and use that credential to authenticate requests.
5757

58-
The Azure Identity library focuses on OAuth authentication with Azure AD. It offers various credential classes capable of acquiring an Azure AD access token. See the [Credential classes](#credential-classes "Credential classes") section below for a list of this library's credential classes.
58+
The Azure Identity library focuses on OAuth authentication with Microsoft Entra ID. It offers various credential classes capable of acquiring a Microsoft Entra access token. See the [Credential classes](#credential-classes "Credential classes") section below for a list of this library's credential classes.
5959

6060
### DefaultAzureCredential
6161

@@ -212,7 +212,7 @@ client = SecretClient("https://my-vault.vault.azure.net", credential)
212212

213213
## Cloud configuration
214214

215-
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 `authority` argument. [AzureAuthorityHosts](https://aka.ms/azsdk/python/identity/docs#azure.identity.AzureAuthorityHosts) defines authorities for well-known clouds:
215+
Credentials default to authenticating to the Microsoft Entra endpoint for Azure Public Cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `authority` argument. [AzureAuthorityHosts](https://aka.ms/azsdk/python/identity/docs#azure.identity.AzureAuthorityHosts) defines authorities for well-known clouds:
216216

217217
```python
218218
from azure.identity import AzureAuthorityHosts
@@ -244,7 +244,7 @@ Not all credentials require this configuration. Credentials that authenticate th
244244
|[`ChainedTokenCredential`][chain_cred_ref]| Allows users to define custom authentication flows composing multiple credentials.
245245
|[`EnvironmentCredential`][environment_cred_ref]| Authenticates a service principal or user via credential information specified in environment variables.
246246
|[`ManagedIdentityCredential`][managed_id_cred_ref]| Authenticates the managed identity of an Azure resource.
247-
|[`WorkloadIdentityCredential`][workload_id_cred_ref]| Supports [Azure AD workload identity](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes.
247+
|[`WorkloadIdentityCredential`][workload_id_cred_ref]| Supports [Microsoft Entra Workload ID](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes.
248248

249249
### Authenticate service principals
250250

@@ -282,24 +282,24 @@ variables:
282282

283283
|Variable name|Value
284284
|-|-
285-
|`AZURE_CLIENT_ID`|ID of an Azure AD application
286-
|`AZURE_TENANT_ID`|ID of the application's Azure AD tenant
285+
|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
286+
|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant
287287
|`AZURE_CLIENT_SECRET`|one of the application's client secrets
288288

289289
### Service principal with certificate
290290

291291
|Variable name|Value
292292
|-|-
293-
|`AZURE_CLIENT_ID`|ID of an Azure AD application
294-
|`AZURE_TENANT_ID`|ID of the application's Azure AD tenant
293+
|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
294+
|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant
295295
|`AZURE_CLIENT_CERTIFICATE_PATH`|path to a PEM or PKCS12 certificate file including private key
296296
|`AZURE_CLIENT_CERTIFICATE_PASSWORD`|password of the certificate file, if any
297297

298298
### Username and password
299299

300300
|Variable name|Value
301301
|-|-
302-
|`AZURE_CLIENT_ID`|ID of an Azure AD application
302+
|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
303303
|`AZURE_USERNAME`|a username (usually an email address)
304304
|`AZURE_PASSWORD`|that user's password
305305

@@ -314,7 +314,7 @@ As of version 1.14.0, accessing resources protected by [Continuous Access Evalua
314314
Token caching is a feature provided by the Azure Identity library that allows apps to:
315315
- Cache tokens in memory (default) or on disk (opt-in).
316316
- Improve resilience and performance.
317-
- Reduce the number of requests made to Azure AD to obtain access tokens.
317+
- Reduce the number of requests made to Microsoft Entra ID to obtain access tokens.
318318

319319
The Azure Identity library offers both in-memory and persistent disk caching. For more details, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/TOKEN_CACHING.md).
320320

@@ -329,7 +329,7 @@ Credentials raise `CredentialUnavailableError` when they're unable to attempt au
329329

330330
Credentials raise `azure.core.exceptions.ClientAuthenticationError` when they fail to authenticate. `ClientAuthenticationError` has a `message` attribute, which describes why authentication failed. When raised by `DefaultAzureCredential` or `ChainedTokenCredential`, the message collects error messages from each credential in the chain.
331331

332-
For more information on handling specific Azure AD errors, see the Azure AD [error code documentation](https://learn.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes).
332+
For more information on handling specific Microsoft Entra ID errors, see the Microsoft Entra ID [error code documentation](https://learn.microsoft.com/azure/active-directory/develop/reference-error-codes).
333333

334334
### Logging
335335

@@ -348,7 +348,7 @@ credential = DefaultAzureCredential(logging_enable=True)
348348

349349
### Client library support
350350

351-
Client and management libraries listed on the [Azure SDK release page](https://azure.github.io/azure-sdk/releases/latest/python.html) that support Azure AD authentication accept credentials from this library. You can learn more about using these libraries in their documentation, which is linked from the release page.
351+
Client and management libraries listed on the [Azure SDK release page](https://azure.github.io/azure-sdk/releases/latest/python.html) that support Microsoft Entra authentication accept credentials from this library. You can learn more about using these libraries in their documentation, which is linked from the release page.
352352

353353
### Known issues
354354

0 commit comments

Comments
 (0)