Skip to content

Commit 25bd148

Browse files
nijelMatt Massoodi
andauthored
fix(azure): use access_token when id_token is not available #1078
According to #750 (comment) this fixes #749 Co-authored-by: Matt Massoodi <matt@puroxy.io>
1 parent 2540b4c commit 25bd148

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

social_core/backends/azuread_tenant.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ def get_user_id(self, details, response):
8686

8787
def user_data(self, access_token, *args, **kwargs):
8888
response = kwargs.get("response")
89-
id_token = response.get("id_token")
89+
if response and response.get("id_token"):
90+
id_token = response.get("id_token")
91+
else:
92+
id_token = access_token
9093

9194
# get key id and algorithm
9295
key_id = get_unverified_header(id_token)["kid"]

0 commit comments

Comments
 (0)