Hello,
I’ve implemented a custom event listener(inheriting from org.keycloak.events.EventListenerProvider interface) to listen for specific user events. I’m interested in the GROUP_MEMBERSHIP event for example, when an existing user is added to a group. The problem I’m having is that there is no user information in the event, only the group information is present. Is there a way to get details e.g(user Id) of the user being added to the group?(perhaps through the KeycloakSession?)
Here’s the payload from event.getRepresentation() in my class’s public void onEvent(AdminEvent event, boolean includeRepresentation) method:
{“id”:“9a612d0f-c85a-4ee3-9b7a-1ecc5b695efe”,“name”:“Test Group”,“path”:“/Test Group”,“attributes”:{},“realmRoles”:,“clientRoles”:{}}
The id above is the group id, not user id.