@@ -1766,6 +1766,17 @@ def acquire_token_interactive(
17661766 - A dict containing an "error" key, when token refresh failed.
17671767 """
17681768 data = kwargs .pop ("data" , {})
1769+ enable_msa_passthrough = kwargs .pop ( # MUST remove it from kwargs
1770+ "enable_msa_passthrough" , # Keep it as a hidden param, for now.
1771+ # OPTIONAL. MSA-Passthrough is a legacy configuration,
1772+ # needed by a small amount of Microsoft first-party apps,
1773+ # which would login MSA accounts via ".../organizations" authority.
1774+ # If you app belongs to this category, AND you are enabling broker,
1775+ # you would want to enable this flag. Default value is False.
1776+ # More background of MSA-PT is available from this internal docs:
1777+ # https://microsoft.sharepoint.com/:w:/t/Identity-DevEx/EatIUauX3c9Ctw1l7AQ6iM8B5CeBZxc58eoQCE0IuZ0VFw?e=tgc3jP&CID=39c853be-76ea-79d7-ee73-f1b2706ede05
1778+ False
1779+ ) and data .get ("token_type" ) != "ssh-cert" # Work around a known issue as of PyMsalRuntime 0.8
17691780 self ._validate_ssh_cert_input_data (data )
17701781 if not on_before_launching_ui :
17711782 on_before_launching_ui = lambda ** kwargs : None
@@ -1786,21 +1797,6 @@ def acquire_token_interactive(
17861797 logger .warning (
17871798 "Ignoring parameter extra_scopes_to_consent, "
17881799 "which is not supported by broker" )
1789- enable_msa_passthrough = kwargs .pop (
1790- "enable_msa_passthrough" , # Keep it as a hidden param, for now.
1791- # OPTIONAL. MSA-Passthrough is a legacy configuration,
1792- # needed by a small amount of Microsoft first-party apps,
1793- # which would login MSA accounts via ".../organizations" authority.
1794- # If you app belongs to this category, AND you are enabling broker,
1795- # you would want to enable this flag. Default value is equivalent to False.
1796- self .client_id in [
1797- # Experimental: Automatically enable MSA-PT mode for known MSA-PT apps
1798- # More background of MSA-PT is available from this internal docs:
1799- # https://microsoft.sharepoint.com/:w:/t/Identity-DevEx/EatIUauX3c9Ctw1l7AQ6iM8B5CeBZxc58eoQCE0IuZ0VFw?e=tgc3jP&CID=39c853be-76ea-79d7-ee73-f1b2706ede05
1800- "04b07795-8ddb-461a-bbee-02f9e1bf7b46" , # Azure CLI
1801- "04f0c124-f2bc-4f59-8241-bf6df9866bbd" , # Visual Studio
1802- ] and data .get ("token_type" ) != "ssh-cert" # Work around a known issue as of PyMsalRuntime 0.8
1803- )
18041800 return self ._acquire_token_interactive_via_broker (
18051801 scopes ,
18061802 parent_window_handle ,
0 commit comments