UsersResource.search([attribute], x, x) Doesn't work #8446
Unanswered
jaggaer-npasic
asked this question in
Q&A
Replies: 1 comment 5 replies
-
|
Take a look at https://www.keycloak.org/docs-api/15.0/rest-api/index.html#_users_resource The search query parameter does a fuzzy search across many attributes (?search=[email protected]), while if you want to explicitly look for usrs by email use the email query parameter (?email=[email protected]). |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Can someone help me with this issue?
According to documentation (https://www.keycloak.org/docs-api/11.0/javadocs/org/keycloak/admin/client/resource/UsersResource.html#search-java.lang.String-java.lang.Integer-java.lang.Integer-)
Search for users whose username or email matches the value provided by search. The search argument also allows finding users by specific attributes as follows:
id: - Find users by identifier. For instance, id:aa497859-bbf5-44ac-bf1a-74dbffcaf197
This should allow us to get the user by email, but this doesn't work.
search - the value to search. It can be the username, email or any of the supported options to query based on user attributes
I tried to call this method usersResource.search("email:[email protected]", 0,100); but in case when any other attribute than id is used it doesn't retrieve anything, only id works.
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions