Search code examples
keycloakkeycloak-rest-api

Will keycloak store the LDAP Mappers values stored in keycloak DB?


In Keycloak db I can see user details which are imported from LDAP but not attributes(Mappers), anyone please provide the informaiton about table where it will be stored.

I wanted to develop one API for users info, I am not able achive with exsting API.

http://localhost:8080/admin/realms/relame/users?q=emailid:<email> position:<Deputy Manager>

I am not able to get the users info with query params(LDAP Attribute which have space like if I pass Manager I will get the response) that I provided above.


Solution

  • We can achive by doing this as below. q=emailid:username@email.com position:"Deputy Manager" (correctly url encoded q=emailid%3Ausername%40email.com%20position%3A%22Deputy%20Manager%22). If the value has a quote you need to escape it q=position:"Deputy"Manager" (url encoded again).

    as examplained https://github.com/keycloak/keycloak/issues/21598 "here"