Invalid Search Criteria Error Using Okta Workflows to List Users with Filter
Last Updated:
Overview
When the Okta Workflows List Users with Filter card returns an invalid search criteria error, compare the expression with the properties, operators, and Boolean logic supported by the Okta Users API filter parameter.
For broader criteria, use List Users with Search only when the Users API search parameter supports the requested fields and operators. Unsupported syntax can cause the API to reject the request before it returns users.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Workflows
- List Users with Filter Card
Cause
The list user with a filter API call supports the following limited number of properties:
statuslastUpdatedidprofile.login,profile.emailprofile.firstNameprofile.lastName
The List Users with Filter card sends its Custom Filter input to the Okta Users API filter parameter. That parameter accepts only specific properties and operators:
- Supported properties: “status,” “lastUpdated,” “id,” “profile.login,” “profile.email,” “profile.firstName,” and “profile.lastName”
- Use “eq” with those properties
- Use “gt,” “ge,” “lt,” or “le” only with “lastUpdated”
- Combine criteria with “and” or “or”; “not” is not supported
- Property names and values are case-sensitive; operators are not
An unsupported property, operator, or expression can cause the API to reject the filter.
Solution
How is the invalid search criteria error resolved?
If a property or attribute is unsupported by the Filter API endpoint, use the List Users with Search card instead of the List Users with Filter card. The List Users with Search card searches for users based on the properties specified in the search parameter and has a larger range of supported parameters.
The List Users with Search card provides the following expanded search capabilities and parameters.
- Searches many properties:
- Accepts
sortByandsortOrderparameters.sortBycan be any single property, for examplesortBy=profile.lastName.sortOrderis optional and defaults to ascending.sortOrderis ignored ifsortByis not present.- Users with the same value for the
sortByproperty will be ordered byid.
