roy
January 12, 2018, 10:38am
1
In our new website there will be a search functionality for people. Therefor we using the list users API request. This works great if we only search on the first name or the last name of the user, see the requests below.
/api/v1/users?q=John&limit=200
/api/v1/users?q=Doe&limit=200
If we search on both the first and the last name there aren’t any results. Is it possible to search also on first and last name combined?
/api/v1/users?q=John+Doe&limit=200
vijet
January 12, 2018, 5:51pm
2
Hi Roy,
You can use the “List Users with a filter” option to search for firstName and lastName.
https://developer.okta.com/docs/api/resources/users.html#list-users-with-a-filter
With the filter option, your query would look like this - /api/v1/users?filter=profile.firstName eq "John" and profile.lastName eq "Doe"
Regards,
Vijet
roy
January 15, 2018, 6:55am
3
Hi Vijet,
Thanks for the possible solution. My preferred option would be a option where we could use only one input field for the first and last name combined.
But if that isn’t possible this could be a solution, thanks.
roy
January 23, 2018, 12:57pm
4
Fixed it for now, i’m doing multiple calls.
1 Like
system
Closed
January 12, 2024, 9:28pm
5
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.