Skip to content

Commit

Permalink
Make select_account and login_hint mutual-exclusive when msalruntime …
Browse files Browse the repository at this point in the history
…is used
  • Loading branch information
rayluo committed Jan 25, 2022
1 parent cf41a79 commit 4fe352d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions msal/wam.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def _signin_interactively(
# the actual redirect_uri will be a value hardcoded by the underlying WAM
if prompt:
if prompt == "select_account":
if login_hint:
# FWIW, AAD's browser interactive flow would honor select_account
# and ignore login_hint in such a case.
# But pymsalruntime 0.3.x would pop up a meaningless account picker
# and then force the account_hint user to re-input password. Not what we want.
raise ValueError("Using both select_account and login_hint is not supported")
params.set_select_account_option(
pymsalruntime.SelectAccountOption.SHOWLOCALACCOUNTSCONTROL)
else:
Expand Down

0 comments on commit 4fe352d

Please sign in to comment.