REST API /role-mappings/realm not returning associated roles for LDAP federation user

Hi,

I have setup a user federation via OpenLDAP, configured a role-ldap-mapper and setup associated roles adding the relevant Keycloak roles to the LDAP roles. I can login with an user from the LDAP and the JWT token contains all roles (LDAP + Associated Keycloak roles). However if I query this particular user and try to get his roles via REST API /admin/realms/{realm}/users/{ldap-user-id}/role-mappings/realm I get only the LDAP roles returned and not the associated Keycloak roles.

Any idea if there is something missing here or is this a bug?

Thank you in advance
Kind regards,
Ben

Hi,

I figured it out. Missed that there is a /role-mappings/realm/composite call to get the recursive composites.

Cheers,
Ben