-
-
Notifications
You must be signed in to change notification settings - Fork 910
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
Use id_token for Azure AD Source #9871
Comments
We'll probably still call the userinfo endpoint in the end, so that we're able to provide that information for source property mappings (#8771) |
So this can't be implemented? |
It would depend on how much data is actually included in the id_token given by azure. From a very quick look at the documentation, it seems like the id_token wouldn't contain all the data that one could retrieve from the userinfo endpoint, but feel free to correct me if I'm wrong |
The only field missing is the profile picture, even though the docs say that the fields of the id_token should be a superset of the ones from the userinfo endpoint: https://learn.microsoft.com/en-us/entra/identity-platform/userinfo#consider-using-an-id-token-instead |
You're right I missed that bit. That would be a welcomed improvement indeed then |
I have a similar issue with Azure AD and missing information in the userinfo endpoint. I am not completely sure what the expected implementation would be but for me it would be great to simply have the (decoded) id_token available in an |
iirc the id_token from |
Is your feature request related to a problem? Please describe.
The Azure AD source type currently requires the Microsoft Graph API scope User.Read to read the userinfo endpoint. This forbids any other non Graph API scopes to be added which we need (in our case:
XboxLive.signin
).Microsoft itself recommends using id_tokens for OIDC as long as one doesn't need to retrieve extended user-info from the Graph API: https://learn.microsoft.com/en-us/entra/identity-platform/v2-protocols-oidc#enable-id-tokens
Describe the solution you'd like
Azure AD supports id_tokens which contain all claims required for creating an user in Authentik (
preferred_username
,email
andname
): https://learn.microsoft.com/en-us/entra/identity-platform/id-token-claims-referenceDescribe alternatives you've considered
No alternatives, as there's no other way to get an access token with different scopes without another user prompt.
Additional context
I've already implemented a rough PoC on my own, that still contains some debug logging: https://github.com/silenium-dev/authentik
It works, but I still have to implement tests and properly clean the code.
I'll create a draft pull request for this.
The text was updated successfully, but these errors were encountered: