-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to add Microsoft Azure Account #12317
Comments
Hi @plaf2000 |
Hi @mattiagiupponi and thank you for your answer. Thank you in advance |
@mattiagiupponi Some other questions regarding testing. I see that at the moment the only social account tested is Google.
|
If are not there, it would be nice
Yes i guess mocking the responses is the best approach now |
Expected Behavior
Successfully sign up with Microsoft Azure.
Actual Behavior
Getting the following error:
Steps to Reproduce the Problem
Specifications
Where the Problem Lies
The
'unique_name'
key specified by theUID_FIELD
Azure's provider settings variable (SOCIALACCOUNT_PROVIDERS_DEFS['azure']['UID_FIELD']
) is not in the response body from https://graph.microsoft.com/v1.0/me. The attribute that should be considered is'id'
instead: https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http.Proposed fix(es)
In order to fix the issue, it is enough to change the
UID_FIELD
to'id'
. This can therefore also be easly done by a settings override, but, probably, this should be the default field defined insettings.py
.To keep the backward compatibility with older API versions using the
'unique_name'
field (is that so?), the following change could be taken into account as well:In that case it wouldn't be necessary to change the
UID_FIELD
value.The text was updated successfully, but these errors were encountered: