
RayA.78577 (OpenSesame) asked a question.
In using the User API, I'm trying to search for users based on their email domain (@company.com) and the User API does not support ew (ends with) or pr (present) operators. Has anyone figured out how to do this with the User API?

Hi, @RayA.78577 (OpenSesame)
Thank you for posting on our Community page!
Please check the following links with information related to your question:
https://developer.okta.com/docs/reference/api/users/#list-users
https://developer.okta.com/docs/reference/user-query/#filter-users
https://support.okta.com/help/s/article/How-to-pull-a-list-of-all-users-with-a-specific-email-domain?language=en_US
Also, feel free to post this question on our Okta Developer Forums: https://devforum.okta.com, and they should be able to help you with this.
Thank you for reaching out to our Community and have a great day!
--
Help others in the community by liking or hitting Select as Best if this response helped you.
Thanks Laura,
That last article from Nov seems to have the right approach. Okta doesn't seem to allow the Everyone group to be selected, it looks like there's an expectation that at least one new group exists besides Everyone. We may have to look at how we're using Groups to make that work, but it's a much better answer than what exists in the API documentation.
Hi Ray
I wrote a little tool to do that. Note, it fetches ALL users of a given status and then searches locally. If you have a lot of users, it will take a while.
https://github.com/gabrielsroka/gabrielsroka.github.io/blob/master/SearchUsers.js
You could also use rockstar to export all users. It would work basically the same way, except to a CSV.
https://gabrielsroka.github.io/rockstar