One API call to retrieve UserId, EmailVerified, Groups and Roles by username. #25181
Replies: 2 comments
-
|
Hi, hope that helps! |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the confirmation! As a side question to better understand the system, what is the point of optional parameter briefRepresentation when calling get user by username? briefRepresentation is by default set to false but the return of the call is already reduced thus, setting it to true makes it reduce further. What is the point of that? Why is the logic not more briefRepresentation=true by default so the call returns a reduced object and setting it to false would return the full user representation? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, am trying to understand best which endpoints to call for our needs. We want to construct a c# object containing 4 properties on our end.
Viewing the endpoint to get a user by username, we would get a reduced json object that does not contain groups and roles, understandable. I also saw that another endpoint /{realm}/users/{id} exists and returns UserRepresentation object. The problem is when I call this endpoint /{realm}/users/{id} I do not see groups or roles (this user does have groups and roles), in fact I see the same results as with the first endpoint GET /{realm}/users?username={userId}&exact=true.
So for the second endpoint /{realm}/users/{id} am I wrong to expect the full UserRepresentation object (including Roles and Groups)? If not, what am I doing wrong when calling this endpoint?
If not getting the full UserRepresentation object is expected, what are some solutions/suggestions going forward to achieve our wants/needs of creating this c# object with the above 4 properties with one endpoint call.
Please let me know if I can provide more examples or provide a better explanation of our needs, thank you!
Beta Was this translation helpful? Give feedback.
All reactions