Search for Users Using Custom Search Criteria in Workflows in Okta
Last Updated:
Overview
Searching for users using custom search criteria in Okta Workflows requires specific configuration. Utilizing the Custom Search Criteria field on the Okta List Users with Search card allows filtering users based on specific profile properties, top-level attributes, and user types.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Workflows
Solution
What are the steps to configure a custom user search in Okta Workflows?
The Okta – List Users with Search card has a Custom Search Criteria field. The Operators section lists the available operators.
Configure the Custom Search Criteria field on the List Users with Search card by reviewing the following example.
The Custom Search Criteria field uses the List all Users API search parameter. There is also a filter parameter, and the Okta – List Users with Filter card uses it.
- For best performance, it is recommended to use this parameter for search.
The API documents search parameter lists properties that can be used in the search.
This operation searches many properties:
- Any user profile property, including custom-defined properties.
- The top-level properties
id,status,created,activated,statusChanged, andlastUpdated. - The User Type accessed as
type.id.
The following examples demonstrate custom search criteria expressions
- Return all active users by configuring the card with the
status eq "ACTIVE"search expression as demonstrated in the following example.
-
Return users who are either active or suspended by applying the following search configuration
status eq "ACTIVE" or status eq "SUSPENDED".
- Return users who have a non-empty value in the profile.linkedInProfile field by utilizing the pr operator as shown in the following example:
-
Search for users created before a specified date by applying the
lt (less than)operator as demonstrated in the following example:
How does Okta Workflows filter users by the Last Login field?
NOTE: The Last Login user field remains unavailable when performing a direct search.
Filter users by their last login date by passing the user list from the List Users with Search card to a List Filter card as demonstrated in the following configuration.
The List Users with Search card returns all users. The card passes the user list to the List Filter card, which filters the list for users whose last login occurred before a specified date.
Related References
- Search Table by Date in Workflows
- Searching a Table Using a Custom Filter in Workflows
- How to Search a Card’s JSON Response in Workflows
- How To Search for Groups Using Custom Search Criteria in Workflows
