Skip to content

Commit 0f2ff43

Browse files
authored
[Identity] Release prep and cleanup (#40827)
- Removed some docs related to `UsernamePasswordCredential` - Drop Python 3.8 support - Update changelog - Updated TSG with AZ CLI credential subscription info Signed-off-by: Paul Van Eck <[email protected]>
1 parent 3923754 commit 0f2ff43

File tree

6 files changed

+9
-32
lines changed

6 files changed

+9
-32
lines changed

sdk/identity/azure-identity/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Release History
22

3-
## 1.21.1 (Unreleased)
4-
5-
### Features Added
3+
## 1.22.0 (2025-05-06)
64

75
### Breaking Changes
86

@@ -15,6 +13,7 @@
1513
### Other Changes
1614

1715
- Deprecated `VisualStudioCodeCredential` as the VS Code Azure Account extension on which this credential depends on has been deprecated. See the Azure Account extension [deprecation notice](https://github.com/microsoft/vscode-azure-account/issues/964). ([#40613](https://github.com/Azure/azure-sdk-for-python/pull/40613))
16+
- Python 3.8 is no longer supported. Please use Python version 3.9 or later.
1817

1918
## 1.21.0 (2025-03-11)
2019

sdk/identity/azure-identity/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pip install azure-identity
2121
### Prerequisites
2222

2323
- An [Azure subscription](https://azure.microsoft.com/free/python)
24-
- Python 3.8 or a recent version of Python 3 (this library doesn't support end-of-life versions)
24+
- Python 3.9 or a recent version of Python 3 (this library doesn't support end-of-life versions)
2525

2626
### Authenticate during local development
2727

sdk/identity/azure-identity/TROUBLESHOOTING.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This troubleshooting guide covers failure investigation techniques, common error
1515
- [Troubleshoot ClientAssertionCredential authentication issues](#troubleshoot-clientassertioncredential-authentication-issues)
1616
- [Troubleshoot ClientSecretCredential authentication issues](#troubleshoot-clientsecretcredential-authentication-issues)
1717
- [Troubleshoot CertificateCredential authentication issues](#troubleshoot-certificatecredential-authentication-issues)
18-
- [Troubleshoot UsernamePasswordCredential authentication issues](#troubleshoot-usernamepasswordcredential-authentication-issues)
1918
- [Troubleshoot ManagedIdentityCredential authentication issues](#troubleshoot-managedidentitycredential-authentication-issues)
2019
- [Azure Virtual Machine managed identity](#azure-virtual-machine-managed-identity)
2120
- [Azure App Service and Azure Functions managed identity](#azure-app-service-and-azure-functions-managed-identity)
@@ -94,7 +93,7 @@ See full SDK logging documentation with examples [here][sdk_logging_docs].
9493

9594
| Error Message |Description| Mitigation |
9695
|---|---|---|
97-
|Environment variables aren't fully configured.|A valid combination of environment variables wasn't set.|Ensure the appropriate environment variables are set **prior to application startup** for the intended authentication method.<p/> <ul><li>To authenticate a service principal using a client secret, ensure the variables `AZURE_CLIENT_ID`, `AZURE_TENANT_ID` and `AZURE_CLIENT_SECRET` are properly set.</li><li>To authenticate a service principal using a certificate, ensure the variables `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_CERTIFICATE_PATH`, and optionally `AZURE_CLIENT_CERTIFICATE_PASSWORD` are properly set.</li><li>To authenticate a user using a password, ensure the variables `AZURE_USERNAME` and `AZURE_PASSWORD` are properly set.</li><ul>|
96+
|Environment variables aren't fully configured.|A valid combination of environment variables wasn't set.|Ensure the appropriate environment variables are set **prior to application startup** for the intended authentication method.<p/> <ul><li>To authenticate a service principal using a client secret, ensure the variables `AZURE_CLIENT_ID`, `AZURE_TENANT_ID` and `AZURE_CLIENT_SECRET` are properly set.</li><li>To authenticate a service principal using a certificate, ensure the variables `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_CERTIFICATE_PATH`, and optionally `AZURE_CLIENT_CERTIFICATE_PASSWORD` are properly set.</li><ul>|
9897

9998
## Troubleshoot `ClientSecretCredential` authentication issues
10099

@@ -124,13 +123,6 @@ See full SDK logging documentation with examples [here][sdk_logging_docs].
124123
|AADSTS700023| Client assertion audience claim does not match Realm issuer. Review the documentation at https://learn.microsoft.com/entra/identity-platform/certificate-credentials. | Ensure the audience `aud` field in the JWT assertion created has the correct value for the audience specified in the payload. This should be set to `https://login.microsoftonline.com/{tenantId}/v2`.|
125124
|AADSTS50027| JWT token is invalid or malformed. | Ensure the JWT assertion token is in the valid format. Refer to the documentation for [client assertion format](https://learn.microsoft.com/entra/identity-platform/certificate-credentials).|
126125

127-
## Troubleshoot `UsernamePasswordCredential` authentication issues
128-
129-
`ClientAuthenticationError`
130-
| Error Code | Issue | Mitigation |
131-
|---|---|---|
132-
|AADSTS50126|The provided username or password is invalid|Ensure the `username` and `password` provided when constructing the credential are valid.|
133-
134126
## Troubleshoot `ManagedIdentityCredential` authentication issues
135127

136128
The `ManagedIdentityCredential` is designed to work on a variety of Azure hosts that provide managed identity. Configuring the managed identity and troubleshooting failures varies from hosts. The below table lists the Azure hosts that can be assigned a managed identity, and are supported by the `ManagedIdentityCredential`.
@@ -197,6 +189,7 @@ curl 'http://169.254.169.254/metadata/identity/oauth2/token?resource=https://man
197189
|---|---|---|
198190
|Azure CLI not installed|The Azure CLI isn't installed or couldn't be found.|<ul><li>Ensure the Azure CLI is properly installed. Installation instructions can be found [here](https://learn.microsoft.com/cli/azure/install-azure-cli).</li><li>Validate the installation location has been added to the `PATH` environment variable.</li></ul>|
199191
|Please run 'az login' to set up account|No account is currently logged into the Azure CLI, or the login has expired.|<ul><li>Log into the Azure CLI using the `az login` command. More information on authentication in the Azure CLI can be found [here](https://learn.microsoft.com/cli/azure/authenticate-azure-cli).</li><li>Validate that the Azure CLI can obtain tokens. See [below](#verify-the-azure-cli-can-obtain-tokens) for instructions.</li></ul>|
192+
|Subscription "[your subscription]" contains invalid characters. If this is the name of a subscription, use its ID instead|The subscription name contains a character that may not be safe in a command line.|Use the subscription's ID instead of its name. You can get this from the Azure CLI: `az account show --name "[your subscription]" --query "id"`|
200193

201194
#### __Verify the Azure CLI can obtain tokens__
202195

sdk/identity/azure-identity/azure/identity/_credentials/environment.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
class EnvironmentCredential:
2525
"""A credential configured by environment variables.
2626
27-
This credential is capable of authenticating as a service principal using a client secret or a certificate, or as
28-
a user with a username and password. Configuration is attempted in this order, using these environment variables:
27+
This credential is capable of authenticating as a service principal using a client secret or a certificate.
28+
Configuration is attempted in this order, using these environment variables:
2929
3030
Service principal with secret:
3131
- **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID.
@@ -47,20 +47,6 @@ class EnvironmentCredential:
4747
"login.microsoftonline.com", the authority for Azure Public Cloud, which is the default
4848
when no value is given.
4949
50-
User with username and password:
51-
**Deprecated**: Username and password authentication doesn't support multifactor authentication (MFA).
52-
For more details on Microsoft Entra MFA enforcement, see https://aka.ms/azsdk/identity/mfa.
53-
54-
- **AZURE_CLIENT_ID**: the application's client ID
55-
- **AZURE_USERNAME**: a username (usually an email address)
56-
- **AZURE_PASSWORD**: that user's password
57-
- **AZURE_TENANT_ID**: (optional) ID of the service principal's tenant. Also called its 'directory' ID.
58-
If not provided, defaults to the 'organizations' tenant, which supports only Microsoft Entra work or
59-
school accounts.
60-
- **AZURE_AUTHORITY_HOST**: authority of a Microsoft Entra endpoint, for example
61-
"login.microsoftonline.com", the authority for Azure Public Cloud, which is the default
62-
when no value is given.
63-
6450
.. admonition:: Example:
6551
6652
.. literalinclude:: ../samples/credential_creation_code_snippets.py

sdk/identity/azure-identity/azure/identity/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
VERSION = "1.21.1"
5+
VERSION = "1.22.0"

sdk/identity/azure-identity/setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"Programming Language :: Python",
4343
"Programming Language :: Python :: 3 :: Only",
4444
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.8",
4645
"Programming Language :: Python :: 3.9",
4746
"Programming Language :: Python :: 3.10",
4847
"Programming Language :: Python :: 3.11",
@@ -58,7 +57,7 @@
5857
"azure",
5958
]
6059
),
61-
python_requires=">=3.8",
60+
python_requires=">=3.9",
6261
install_requires=[
6362
"azure-core>=1.31.0",
6463
"cryptography>=2.5",

0 commit comments

Comments
 (0)