I’m writing code for a feature that allows us to change the email domain for all users given old and new domain names.
So I would need to search the directory for all users having the old email domain.
If I do a search like:
/api/v1/users?search=profile.email+sw+%22test%22
I get all users whose email starts with ‘test’
But if I search with endsWith:
/api/v1/users?search=profile.email+ew+%22example.com%22
I get this error:
{
"errorCode": "E0000031",
"errorSummary": "Invalid search criteria.",
"errorLink": "E0000031",
"errorId": "oaeBre_Q4s6SHWeKFK6WCo4Og",
"errorCauses": [
{
"errorSummary": "Invalid search syntax."
}
]
}
I expect that the directory will eventually be quite large, so I don’t want to pull all users.
How can I search users by email domain?