Search Users (Okta)
Search for users in Okta based on a search query.
For more information on the API for searching users, see Search users (opens in a new tab).
SDK Import:
from admyral.actions import okta_search_users
Arguments:
Argument Name | Description | Required |
---|---|---|
Search search | The search query to filter users. | - |
Limit limit | The maximum number of users to list. Default: 1000 | - |
Search Examples
The search query supports various properties and operators:
-
Searches many properties:
- Any user profile property, including custom-defined properties
- Top-level properties:
id
,status
,created
,activated
,statusChanged
, andlastUpdated
- User Type accessed as
type.id
-
Accepts
sortBy
andsortOrder
parameters:sortBy
can be any single property, e.g.,sortBy=profile.lastName
sortOrder
is optional and defaults to ascendingsortOrder
is ignored ifsortBy
is not present- Users with the same value for the
sortBy
property will be ordered byid
-
The
ne
(not equal) operator isn't supported, but you can uselt ... or ... gt
instead
Search Term Example | Description |
---|---|
status eq "STAGED" | Users that have a status of STAGED |
lastUpdated gt "yyyy-MM-dd'T'HH:mm:ss.SSSZ" | Users last updated after a specific timestamp |
id eq "00u1ero7vZFVEIYLWPBN" | Users with a specified id |
type.id eq "otyfnjfba4ye7pgjB0g4" | Users with a specified User Type ID |
profile.department eq "Engineering" | Users that have a department of Engineering |
profile.occupation eq "Leader" | Users that have an occupation of Leader |
profile.lastName sw "Smi" | Users whose lastName starts with Smi |
Returns
A JSON array of events.
Required Secrets
Secret Placeholder | Description |
---|---|
OKTA_SECRET | Okta secret. See Okta setup |
SDK Example
events = okta_search_users(
search="status eq \"STAGED\"",
limit=1000,
secrets={"OKTA_SECRET": "my_stored_okta_secret"}
)