Skip to content

Commit 45e3966

Browse files
pvaneckrayluo
authored andcommitted
Update deprecated TokenCache API usage
There was a place in `ManagedIdentityClient` where the `TokenCache.find` method was still being used, leading to some deprecation warnings being printed. This updates that to use `TokenCache.search`. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
1 parent 2f9747f commit 45e3966

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msal/managed_identity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def acquire_token_for_client(
298298
now = time.time()
299299
if True: # Attempt cache search even if receiving claims_challenge,
300300
# because we want to locate the existing token (if any) and refresh it
301-
matches = self._token_cache.find(
301+
matches = self._token_cache.search(
302302
self._token_cache.CredentialType.ACCESS_TOKEN,
303303
target=[resource],
304304
query=dict(

0 commit comments

Comments
 (0)