Skip to content

Commit d2f9b9c

Browse files
committed
Right regional endpoint for login.microsoft.com
We got it right in PR 358 based on the specs at that time, but we were using a fragile approach, which caused the "login.microsoft.com" to be left out in subsequent PR 394. Lesson learned. Explicit is better than implicit. https://peps.python.org/pep-0020/
1 parent 5935f0b commit d2f9b9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

msal/application.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,10 @@ def _get_regional_authority(self, central_authority):
526526
if region_to_use:
527527
regional_host = ("{}.r.login.microsoftonline.com".format(region_to_use)
528528
if central_authority.instance in (
529-
# The list came from https://github.com/AzureAD/microsoft-authentication-library-for-python/pull/358/files#r629400328
529+
# The list came from point 3 of the algorithm section in this internal doc
530+
# https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview?path=/PinAuthToRegion/AAD%20SDK%20Proposal%20to%20Pin%20Auth%20to%20region.md&anchor=algorithm&_a=preview
530531
"login.microsoftonline.com",
532+
"login.microsoft.com",
531533
"login.windows.net",
532534
"sts.windows.net",
533535
)

0 commit comments

Comments
 (0)