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
I’m already ok with making calls to user search or q for the primary email or a profile.secondEmail.
I’m looking for a single call that will give me a result for an email that is either in profile.secondEmail field or profile.email (or possibly profile.login)?
Basically, "if any email on the user record matches “mcroft@whiterose.org”, return the user object.