Skip to content

Commit 4fe352d

Browse files
committed
Make select_account and login_hint mutual-exclusive when msalruntime is used
1 parent cf41a79 commit 4fe352d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

msal/wam.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ def _signin_interactively(
100100
# the actual redirect_uri will be a value hardcoded by the underlying WAM
101101
if prompt:
102102
if prompt == "select_account":
103+
if login_hint:
104+
# FWIW, AAD's browser interactive flow would honor select_account
105+
# and ignore login_hint in such a case.
106+
# But pymsalruntime 0.3.x would pop up a meaningless account picker
107+
# and then force the account_hint user to re-input password. Not what we want.
108+
raise ValueError("Using both select_account and login_hint is not supported")
103109
params.set_select_account_option(
104110
pymsalruntime.SelectAccountOption.SHOWLOCALACCOUNTSCONTROL)
105111
else:

0 commit comments

Comments
 (0)