Skip to content

Commit 5935f0b

Browse files
sarathysrayluo
andauthored
Use provided authority port when building the tenant discovery endpoint (#484)
* Use provided authority port when building the tenant discovery endpoint * address PR comment * Polish the implementation Co-authored-by: Ray Luo <[email protected]>
1 parent 053af22 commit 5935f0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

msal/authority.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ def __init__(self, authority_url, http_client, validate_authority=True):
9191
tenant_discovery_endpoint = payload['tenant_discovery_endpoint']
9292
else:
9393
tenant_discovery_endpoint = (
94-
'https://{}{}{}/.well-known/openid-configuration'.format(
94+
'https://{}:{}{}{}/.well-known/openid-configuration'.format(
9595
self.instance,
96+
443 if authority.port is None else authority.port,
9697
authority.path, # In B2C scenario, it is "/tenant/policy"
9798
"" if tenant == "adfs" else "/v2.0" # the AAD v2 endpoint
9899
))

0 commit comments

Comments
 (0)