/userinfo endpoint only has basic attributes

Hello

I have setup a Auth0 application with a SAML connection. Now I’m looking into adding additional user attributes. I have added attributes such as street, postal code, city, country, department…

I can see the attributes and its values in Auth0 in the user profile (Screenshot 2020-05-05 at 18...), but I cannot see them when doing a request to the /userinfo endpoint. I’ve tried adding rules and adjusting scope to openid profile email as the docs mention, but the endpoint response remains the same after all changes.
This is the response of the endpoint Screenshot 2020-05-05 at 18...

Does anyone have an idea what I should do here?

Hi @emeryowa and thanks for reaching out!

Apologies for the delay in answering your question. Would you mind explaining your login flow a bit more so I have an idea of how this should work? It sounds like there’s an initial login where you specify the OIDC scopes and hit the ‘/userinfo’ endpoint afterwards looking for the custom attributes you’ve specified for the user. Have you set up custom claims in a rule? That could allow you to add those attributes to the Id Token and also allow you to access them from the ‘/userinfo’ endpoint. More information on that can be found here:

From the looks of your screengrabs it looks like the response is returning a normalized user profile and will need those custom claims added.

Let me know if that helps get your solution up and running!

Best,
Colin

1 Like

Hello

Thank you for your answer!
I got it working by setting up a role and adjusting the mapping of the SAML enterprise connection

1 Like

Perfect! Glad to hear that!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.