Skip to content

Commit 7f15c39

Browse files
committed
Fix incorrect login_hint detection
1 parent 4d168cf commit 7f15c39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

msal/application.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2241,7 +2241,8 @@ def _acquire_token_interactive_via_broker(
22412241
# _signin_silently() only gets tokens for default account,
22422242
# but this seems to have been fixed in PyMsalRuntime 0.11.2
22432243
"access_token" in response and login_hint
2244-
and response.get("id_token_claims", {}) != login_hint)
2244+
and login_hint != response.get(
2245+
"id_token_claims", {}).get("preferred_username"))
22452246
wrong_account_error_message = (
22462247
'prompt="none" will not work for login_hint="non-default-user"')
22472248
if is_wrong_account:

0 commit comments

Comments
 (0)