Skip to content

Commit 0c5c807

Browse files
committed
An optional tuning happens to also bypass a malfunctioning alias
1 parent 11163f1 commit 0c5c807

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

msal/application.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,12 @@ def acquire_token_silent_with_error(
552552
return result
553553
final_result = result
554554
for alias in self._get_authority_aliases(self.authority.instance):
555+
if not self.token_cache.find(
556+
self.token_cache.CredentialType.REFRESH_TOKEN,
557+
target=scopes,
558+
query={"environment": alias}):
559+
# Skip heavy weight logic when RT for this alias doesn't exist
560+
continue
555561
the_authority = Authority(
556562
"https://" + alias + "/" + self.authority.tenant,
557563
self.http_client,

0 commit comments

Comments
 (0)