Take a look at our testsuite. For example:
How to programically get groups/users/users in groups with roles
from
client using keycloak.admin.client.Keycloak,
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user