Auth0 Home Blog Docs

Return normalized profile for getUser call of PHP sdk

I’m using the 5.5.1 version of the “auth0/auth0-php” composer package. I’m able to call the login and getUser functions successfully. What I’m trying to figure out is how to get normalized profile data. I currently have 2 SAML2 idPs, and they are returning disparate profile data:

g-suite
{
“sub”: “google-apps|john.doe@sample.com”,
“given_name”: “John”,
“family_name”: “Doe”,
“nickname”: “john.doe”,
“name”: “John Doe”,
“picture”: “https://lh3.googleusercontent.com/a-/fdsaf32fewfdsfsaf”,
“locale”: “en”,
“updated_at”: “2019-09-06T19:52:28.375Z”
}

azure:
{
“sub”: “waad|fasdjfdajdklasfjdsla”,
“given_name”: “John”,
“family_name”: “Doe”,
“nickname”: "john.doe@sample.com",
“name”: “John Doe”,
“picture”: “https://s.gravatar.com/avatar/fdsaf34ffd.png”,
“updated_at”: “2019-09-11T23:30:01.941Z”
}

Is there a way to get normalized data from the user object after they login? I see that normalized data is available if I do a separate api request for user search, but that seems like a heavy request to make for every login!

Hey there @brian.anderson, welcome to the Auth0 Community!

That would be a heavy request for every single login. In fact a simplified path way for this is not something we actually have at the current time. However this would make a great feature request for auth0.com/feedback. By sharing your detailed use case there it will allow our product team to review it and evaluate it for future roadmap additions!

I submitted feedback last night. Hopefully I get a response some time today!

1 Like

@brian.anderson Thank you for submitting the feedback. I’m reading it over and will be getting some help from my team to formulate a response.
@James.Morrison Did you intend to say… “…this NOT something we have actually have the current time?” :slight_smile:

1 Like

I’m really hoping that isn’t the case. James definitely got me excited about that feature being something that is ready for me to consume!

Thank you for catching that @michael.wallen, I apologize for leaving the word out :sweat: Sorry about the confusion @brian.