<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

Invalid Search Criteria Error Using Okta Workflows to List Users with Filter

Workflows
Okta Classic Engine
Okta Identity Engine

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.

List Users with Filter

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: 

  • status 
  • lastUpdated
  • id
  • profile.login,
  • profile.email
  • profile.firstName
  • profile.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.
List users with search card 

The List Users with Search card provides the following expanded search capabilities and parameters.

  • Searches many properties:
    • Any user profile property, including custom-defined properties.
    • The top-level properties id, status, created, activated, statusChanged, and lastUpdated.
    • The User Type accessed as type.id.
  • Accepts sortBy and sortOrder parameters.
    • sortBy can be any single property, for example sortBy=profile.lastName.
    • sortOrder is optional and defaults to ascending.
    • sortOrder is ignored if sortBy is not present.
    • Users with the same value for the sortBy property will be ordered by id.

Related References

Loading
Invalid Search Criteria Error Using Okta Workflows to List Users with Filter | Okta Support