SELECT u.username, u.first_name, u.last_name, role.name AS role
FROM keycloak_role role
INNER JOIN realm ON role.realm = realm.id
INNER JOIN user_role_mapping rm ON role.id = rm.role_id
INNER JOIN user_entity u ON rm.user_id = u.id
WHERE realm.name=:1 AND role.name = :2
It might be nice to do this in the web console though...
Is there any easy way to see which users have been assigned a given role?