Skip to content

Commit 71802d0

Browse files
committed
Change regional endpoint doname name
1 parent c687d5b commit 71802d0

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
@@ -371,7 +371,7 @@ def _get_regional_authority(self, central_authority):
371371
self._region_configured if is_region_specified else self._region_detected)
372372
if region_to_use:
373373
logger.info('Region to be used: {}'.format(repr(region_to_use)))
374-
regional_host = ("{}.login.microsoft.com".format(region_to_use)
374+
regional_host = ("{}.r.login.microsoftonline.com".format(region_to_use)
375375
if central_authority.instance in (
376376
# The list came from https://github.com/AzureAD/microsoft-authentication-library-for-python/pull/358/files#r629400328
377377
"login.microsoftonline.com",

tests/test_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ def test_acquire_token_for_client_should_hit_regional_endpoint(self):
798798
status_code=400, text='{"error": "mock"}')) as mocked_method:
799799
self.app.acquire_token_for_client(scopes)
800800
mocked_method.assert_called_with(
801-
'https://westus.login.microsoft.com/{}/oauth2/v2.0/token'.format(
801+
'https://westus.r.login.microsoftonline.com/{}/oauth2/v2.0/token'.format(
802802
self.app.authority.tenant),
803803
params=ANY, data=ANY, headers=ANY)
804804
result = self.app.acquire_token_for_client(

0 commit comments

Comments
 (0)