File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
sdk/identity/azure-identity Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
### Bugs Fixed
10
10
11
+ - Added check on ` content ` from msal response ([ #23483 ] ( https://github.com/Azure/azure-sdk-for-python/issues/23483 ) )
12
+
11
13
### Other Changes
12
14
13
15
## 1.9.0b1 (2022-03-08)
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ def raise_for_status(self):
52
52
53
53
if ContentDecodePolicy .CONTEXT_NAME in self ._response .context :
54
54
content = self ._response .context [ContentDecodePolicy .CONTEXT_NAME ]
55
- if "error" in content or "error_description" in content :
55
+ if not content :
56
+ message = "Unexpected response from Azure Active Directory"
57
+ elif "error" in content or "error_description" in content :
56
58
message = "Authentication failed: {}" .format (content .get ("error_description" ) or content .get ("error" ))
57
59
else :
58
60
for secret in ("access_token" , "refresh_token" ):
You can’t perform that action at this time.
0 commit comments