Skip to content

Commit 0d5719d

Browse files
committed
Skip account creation during acquire_token_silent()
1 parent af984e7 commit 0d5719d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

msal/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ def _acquire_token_silent_by_finding_specific_refresh_token(
755755
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
756756
event,
757757
environment=authority.instance,
758-
add_account=False, # To honor a concurrent remove_account()
758+
skip_account_creation=True, # To honor a concurrent remove_account()
759759
)),
760760
scope=scopes,
761761
headers={

msal/token_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def __add(self, event, now=None):
172172
at["key_id"] = data.get("key_id")
173173
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
174174

175-
if client_info and event.get("add_account") is not False:
175+
if client_info and not event.get("skip_account_creation"):
176176
account = {
177177
"home_account_id": home_account_id,
178178
"environment": environment,

0 commit comments

Comments
 (0)