REST API: How can I find user via primary or secondary email

I have users with 2-3 email addresses in Okta, and they I want to be able to call an API with any of these addresses and get back the user. Basically, I want the program I’m building to use the canonical address, without knowing it in advance.

Does the /Users query or filter function also return results for non-primary email fields?

I’ve looked at the docs, but it’s not clear to me if secondary emails are in scope.

If not, is there a recommended way to use REST API calls to get the information I want?


You can call /users endpoint to do a search/filter based on required attributes (I believe filter supports only a limited set of attributes). Here is the URL, if you were not able to find it Users | Okta Developer

1 Like