Get users on full or display name


#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


#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


#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.