Skip to content

Commit 6b9ef94

Browse files
committed
Demote enable_msa_passthrough into a hidden param
1 parent 15c194d commit 6b9ef94

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

msal/application.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,6 @@ def acquire_token_interactive(
15981598
extra_scopes_to_consent=None,
15991599
max_age=None,
16001600
window=None,
1601-
enable_msa_passthrough=None,
16021601
**kwargs):
16031602
"""Acquire token interactively i.e. via a local browser.
16041603
@@ -1661,13 +1660,6 @@ def acquire_token_interactive(
16611660
you are recommended to also provide its window handle,
16621661
so that the sign in UI window will properly pop up on top of your window.
16631662
1664-
:param boolean enable_msa_passthrough:
1665-
OPTIONAL. MSA-Passthrough is a legacy configuration,
1666-
needed by a small amount of Microsoft first-party apps,
1667-
which would login MSA accounts via ".../organizations" authority.
1668-
If you app belongs to this category, AND you are enabling broker,
1669-
you would want to enable this flag. Default value is equivalent to False.
1670-
16711663
:return:
16721664
- A dict containing no "error" key,
16731665
and typically contains an "access_token" key.
@@ -1694,13 +1686,21 @@ def acquire_token_interactive(
16941686
"no" if self.authority._validate_authority is False
16951687
or self.authority.is_adfs or self.authority._is_b2c
16961688
else None)
1697-
enable_msa_passthrough = self.client_id in [
1698-
# Experimental: Automatically enable MSA-PT mode for known MSA-PT apps
1699-
# More background of MSA-PT is available from this internal docs:
1700-
# https://microsoft.sharepoint.com/:w:/t/Identity-DevEx/EatIUauX3c9Ctw1l7AQ6iM8B5CeBZxc58eoQCE0IuZ0VFw?e=tgc3jP&CID=39c853be-76ea-79d7-ee73-f1b2706ede05
1701-
"04b07795-8ddb-461a-bbee-02f9e1bf7b46", # Azure CLI
1702-
"04f0c124-f2bc-4f59-8241-bf6df9866bbd", # Visual Studio
1703-
] if enable_msa_passthrough is None else enable_msa_passthrough
1689+
enable_msa_passthrough = kwargs.get(
1690+
"enable_msa_passthrough", # Keep it as a hidden param, for now.
1691+
# OPTIONAL. MSA-Passthrough is a legacy configuration,
1692+
# needed by a small amount of Microsoft first-party apps,
1693+
# which would login MSA accounts via ".../organizations" authority.
1694+
# If you app belongs to this category, AND you are enabling broker,
1695+
# you would want to enable this flag. Default value is equivalent to False.
1696+
self.client_id in [
1697+
# Experimental: Automatically enable MSA-PT mode for known MSA-PT apps
1698+
# More background of MSA-PT is available from this internal docs:
1699+
# https://microsoft.sharepoint.com/:w:/t/Identity-DevEx/EatIUauX3c9Ctw1l7AQ6iM8B5CeBZxc58eoQCE0IuZ0VFw?e=tgc3jP&CID=39c853be-76ea-79d7-ee73-f1b2706ede05
1700+
"04b07795-8ddb-461a-bbee-02f9e1bf7b46", # Azure CLI
1701+
"04f0c124-f2bc-4f59-8241-bf6df9866bbd", # Visual Studio
1702+
]
1703+
)
17041704
# Call _signin_silently() and/or _signin_interactively()
17051705
if prompt == "none" or (not prompt and not login_hint):
17061706
response = _signin_silently(

0 commit comments

Comments
 (0)