-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Identity] Revert regional auth env var change #44663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We've decided to shelve this for now until the picture for ESTS-R support becomes more clear. This intrduces some baggage that is a bit undesirable, and it's still possible to use regional auth endpoints without this change through the use of the AZURE_AUTHORITY_HOST env var or by explicitly passing in a regional endpoint to a credential constructor via the `authority` kwarg. Signed-off-by: Paul Van Eck <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR reverts the regional authority environment variable change introduced in PR #44347, removing support for AZURE_REGIONAL_AUTHORITY_NAME from the internal AadClient and AadClientBase classes. The change removes the region discovery logic and regional authority URL construction from these internal clients while preserving support in MSAL-based credentials through msal_credentials.py.
Changes:
- Removed regional authority initialization logic from
AadClientandAadClientBaseclasses - Removed calls to
_initialize_regional_authority()from all token acquisition methods - Removed region discovery and URL building helper methods
- Removed associated test cases for regional authority functionality in internal AAD clients
- Updated CHANGELOG to remove the fixed issue entry
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/identity/azure-identity/azure/identity/_internal/aad_client_base.py |
Removed _regional_authority attribute, regional authority helper methods, and reverted token URL construction to use only _authority |
sdk/identity/azure-identity/azure/identity/_internal/aad_client.py |
Removed _initialize_regional_authority() calls and implementation, removed unused imports |
sdk/identity/azure-identity/azure/identity/aio/_internal/aad_client.py |
Removed async regional authority initialization calls and implementation, removed unused imports |
sdk/identity/azure-identity/tests/test_aad_client.py |
Removed test cases for regional authority functionality |
sdk/identity/azure-identity/tests/test_aad_client_async.py |
Removed async test cases for regional authority functionality |
sdk/identity/azure-identity/CHANGELOG.md |
Removed changelog entry about the regional authority bug fix |
|
/check-enforcer override |
This change reverts #44347.
We've decided to shelf this for now until the picture for ESTS-R support becomes more clear. This introduced some baggage that was a bit undesirable, and it's still possible to use regional auth endpoints without this change through the use of the
AZURE_AUTHORITY_HOSTenv var or by explicitly passing in a regional endpoint to a credential constructor via theauthoritykwarg.