IdentityService: query all group memberships for all users



we would like to query the (Java) IdentityService instance for all group memberships of all users, with only one query. Any ideas how to realize this?


likely use a native query to create the join:

Any specific reason why you need to do this as one query?


Hi Stephen, thank you for your answer! That’s definitely one way to go, even though I’m a bit hesitant to hardcode SQL into our application (Camunda table names and all). I was kind of hoping for API functionality to do this.

The reason why we want to do this as one query is performance - we will have quite a lot of groups and users and we’d like to display the group members for each group in the frontend without having to launch a UserQuery for each group.


But does a user of the Ui need to see all users with each user’s groups all at once? Likely you are going to have your list of users and someone selects a single user to see their groups.

What’s the use case to have to see all users and each of the user’s groups all at once in the UI?


Well, we have a table containing a list of process instances and the user groups associated with each process. Our customer would like to see the members of all associated groups for each process on mouseover.