Skip to content

Commit 2c79aab

Browse files
committed
Switch to new region endpoints
1 parent 0861aba commit 2c79aab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

msal/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def _get_regional_authority(self, central_authority):
622622
else self._region_configured) # It will retain the None i.e. opted out
623623
logger.debug('Region to be used: {}'.format(repr(region_to_use)))
624624
if region_to_use:
625-
regional_host = ("{}.r.login.microsoftonline.com".format(region_to_use)
625+
regional_host = ("{}.login.microsoft.com".format(region_to_use)
626626
if central_authority.instance in (
627627
# The list came from point 3 of the algorithm section in this internal doc
628628
# https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview?path=/PinAuthToRegion/AAD%20SDK%20Proposal%20to%20Pin%20Auth%20to%20region.md&anchor=algorithm&_a=preview

tests/test_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ def _test_acquire_token_for_client(self, configured_region, expected_region):
904904
self.app.http_client, "post", return_value=MinimalResponse(
905905
status_code=400, text='{"error": "mock"}')) as mocked_method:
906906
self.app.acquire_token_for_client(scopes)
907-
expected_host = '{}.r.login.microsoftonline.com'.format(
907+
expected_host = '{}.login.microsoft.com'.format(
908908
expected_region) if expected_region else 'login.microsoftonline.com'
909909
mocked_method.assert_called_with(
910910
'https://{}/{}/oauth2/v2.0/token'.format(

0 commit comments

Comments
 (0)