Skip to content

Commit 1f89447

Browse files
committed
updated a fix for get()
1 parent 63bb27f commit 1f89447

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

msal/application.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,8 @@ def get_client_assertion():
716716
self.client, self._regional_client = self._build_client(
717717
client_credential, self.authority)
718718
# Warn if using a static string/bytes client_assertion (discouraged for long-running apps)
719-
if client_credential and isinstance(client_credential.get("client_assertion"), (str, bytes)):
719+
if isinstance(client_credential, dict) and isinstance(
720+
client_credential.get("client_assertion"), (str, bytes)):
720721
warnings.warn(
721722
"Passing a static string/bytes 'client_assertion' is "
722723
"discouraged because the JWT will eventually expire. "
@@ -725,7 +726,7 @@ def get_client_assertion():
725726
"assertion on demand. "
726727
"See https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/746",
727728
DeprecationWarning, stacklevel=2)
728-
729+
729730
self.authority_groups = {}
730731
self._telemetry_buffer = {}
731732
self._telemetry_lock = Lock()

0 commit comments

Comments
 (0)