[keycloak-user] Best practice for getting roles for all users

Benjamin Huskic benjamin.huskic at thequalitygate.com
Mon Mar 11 11:32:03 EDT 2019


Hello everybody,

I need to query a list of all users with their roles in our application. I would like to avoid calling for every user (~10000) the GET /auth/admin/realms/{realm}/users/{user-uuid}/role-mappings/realm. The GET /auth/admin/realms/{realm}/users unfortunately does not provide the roles. I have read the API documentation and tried to find out any recommendation on the web, but I didn't find any. The only thing I found was a feature request which might help to lower the calls: https://issues.jboss.org/browse/KEYCLOAK-2035 but it seems that this feature was not implemented.

I would like to know if there is a best practice for getting roles for all the users because calling a million times the role-mapping is very inefficient.

Thank you in advance
Kind regards,
Benjamin




[cid:image001.png at 01D4D841.19FC8380]

Benjamin Huskić
Founder & Solution Director

mobile: +971-5444-9-4664
email: benjamin.huskic at thequalitygate.com<mailto:benjamin.huskic at thequalitygate.com>
web: http://www.thequalitygate.com<http://www.thequalitygate.com/>



-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9185 bytes
Desc: image001.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20190311/c5d20058/attachment.png 


More information about the keycloak-user mailing list