amir
April 3, 2022, 11:31am
1
Hi all
in the Keycloak Admin API under the “users” section there is an option to filter results by custom attributes
from the documentation:
however this doesn’t seem to work fo me.
i created a user with the following attribute:
when I send:
http://localhost:8080/auth/admin/realms/myRealm/users?q='isSuperUser: true’ with postman I get nothing.
if I send without the q parameters I see all users
Does anyone know what is the problem?
xgp
April 3, 2022, 3:15pm
2
Try dropping the single quotes and urlencoding the string. E.g. isSuperUser%3Atrue
amir
April 4, 2022, 8:40am
3
@xgp thanks a lot dude. this helps.
actually, you don’t even have too use urlencoding
this URL is working fine in POSTMAN for a user with 3 attributes
just need to separate the attributes with spaces
“{{keycloak_url}}/admin/realms/{{realm}}/users?q=isSuperUser:true k1:v1 k2v2”
1 Like