---
title: "Search System Users"
method: POST
path: "/search/systemusers"
tags: ["Search"]
---

# Search System Users

`POST /search/systemusers`

## Request

- Base URL: `https://console.jumpcloud.com/api`
- URL: `https://console.jumpcloud.com/api/search/systemusers`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api/docs/search/systemusers/post.ts> (a function with typed inputs; its response is checked against the schema)

Return System Users in multi-record format allowing for the passing of the `filter` and `searchFilter` parameters. This WILL NOT allow you to add a new system user.

To support advanced filtering you can use the `filter` and `searchFilter` parameters that can only be passed in the body of POST /api/search/* routes. The `filter` and `searchFilter` parameters must be passed as Content-Type application/json.

The `filter` parameter is an object with a single property, either `and` or `or` with the value of the property being an array of query expressions.

This allows you to filter records using the logic of matching ALL or ANY records in the array of query expressions. If the `and` or `or` are not included the default behavior is to match ALL query expressions.

The `searchFilter` parameter allows text searching on supported fields by specifying a `searchTerm` and a list of `fields` to query on. If any `field` has a partial text match on the `searchTerm` the record will be returned.


#### Sample Request

Exact search for a list of system users in a department
```
curl -X POST https://console.jumpcloud.com/api/search/systemusers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
  "filter" : [{"department" : "IT"}],
  "fields" : "email username sudo"
}'
```

Text search for system users with and email on a domain
```
curl -X POST https://console.jumpcloud.com/api/search/systemusers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
  "searchFilter" : {
    "searchTerm": "@jumpcloud.com",
    "fields": ["email"]
  },
  "fields" : "email username sudo"
}'
```

Text search for multiple system users
```
curl -X POST https://console.jumpcloud.com/api/search/systemusers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
  "searchFilter" : {
    "searchTerm": ["john", "sarah"],
    "fields": ["username"]
  },
  "fields" : "email username sudo"
}'
```

Combining `filter` and `searchFilter` to text search for system users with and email on a domain who are in a list of departments
```
curl -X POST https://console.jumpcloud.com/api/search/systemusers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
  "searchFilter": {
    "searchTerm": "@jumpcloud.com",
    "fields": ["email"]
  },
  "filter": {
    "or": [
      {"department" : "IT"},
      {"department" : "Sales"}
    ]
  },
  "fields" : "email username sudo"
}'
```

## Query parameters

- `fields` string
- `filter` string
- `limit` integer
- `skip` integer

## Headers

- `x-org-id` string
- `x-eventually-consistent` boolean

## Request body

- Search
  - `fields` string
  - `filter` object
  - `searchFilter` object

## Response `200`

OK

- SystemUsersSearchlist
  - `results` SystemuserSearchReturn[]: The list of system users.
    - `_id` string
    - `account_locked` boolean
    - `account_locked_date` string, nullable
    - `activated` boolean
    - `admin` object, nullable
      - `id` string
      - `roleName` string
      - `roleNames` string[]
    - `addresses` object[]
      - `country` string
      - `extendedAddress` string
      - `id` string
      - `locality` string
      - `poBox` string
      - `postalCode` string
      - `region` string
      - `streetAddress` string
      - `type` string
    - `allow_public_key` boolean
    - `alternateEmail` string
    - `attributes` Attribute[]
      - `name` string
      - `value` string
    - `badLoginAttempts` integer
    - `company` string
    - `costCenter` string
    - `created` string
    - `delegatedAuthority` object, nullable: Used by auth to determine password delegation authority
      - `name` 'ActiveDirectory': Authority name
      - `id` string: ObjectId of the target Active Directory connection
    - `department` string
    - `description` string
    - `disableDeviceMaxLoginAttempts` boolean
    - `displayname` string
    - `email` string
    - `employeeIdentifier` string: Must be unique per user.
    - `employeeType` string
    - `enable_managed_uid` boolean
    - `enable_user_portal_multifactor` boolean
    - `external_dn` string
    - `external_password_expiration_date` string
    - `external_source_type` string
    - `externally_managed` boolean: The externally_managed property has been deprecated. Whenever a user has their externally_managed field modified their restrictedFields property gets populated with the appropriate value, even if it is already set to a value an administrator manually set.
    - `firstname` string
    - `jobTitle` string
    - `lastname` string
    - `ldap_binding_user` boolean
    - `location` string
    - `manager` string: Relation with another systemuser to identify the last as a manager.
    - `mfa` Mfa
      - `configured` boolean
      - `exclusion` boolean
      - `exclusionUntil` string, date-time
      - `exclusionDays` integer
    - `mfaEnrollment` MfaEnrollment
      - `totpStatus` 'NOT_ENROLLED' | 'DISABLED' | 'PENDING_ACTIVATION' | 'ENROLLMENT_EXPIRED' | 'IN_ENROLLMENT' | 'PRE_ENROLLMENT' | 'ENROLLED'
      - `webAuthnStatus` 'NOT_ENROLLED' | 'DISABLED' | 'PENDING_ACTIVATION' | 'ENROLLMENT_EXPIRED' | 'IN_ENROLLMENT' | 'PRE_ENROLLMENT' | 'ENROLLED'
      - `pushStatus` 'NOT_ENROLLED' | 'DISABLED' | 'PENDING_ACTIVATION' | 'ENROLLMENT_EXPIRED' | 'IN_ENROLLMENT' | 'PRE_ENROLLMENT' | 'ENROLLED'
      - `smsStatus` 'NOT_ENROLLED' | 'DISABLED' | 'PENDING_ACTIVATION' | 'ENROLLMENT_EXPIRED' | 'IN_ENROLLMENT' | 'PRE_ENROLLMENT' | 'ENROLLED'
      - `overallStatus` 'NOT_ENROLLED' | 'DISABLED' | 'PENDING_ACTIVATION' | 'ENROLLMENT_EXPIRED' | 'IN_ENROLLMENT' | 'PRE_ENROLLMENT' | 'ENROLLED'
      - `jcGoStatus` 'NOT_ENROLLED' | 'DISABLED' | 'PENDING_ACTIVATION' | 'ENROLLMENT_EXPIRED' | 'IN_ENROLLMENT' | 'PRE_ENROLLMENT' | 'ENROLLED'
    - `middlename` string
    - `organization` string
    - `password_date` string, nullable
    - `password_expiration_date` string, nullable
    - `password_expired` boolean
    - `password_never_expires` boolean
    - `passwordless_sudo` boolean
    - `phoneNumbers` object[]
      - `id` string
      - `number` string
      - `type` string
    - `public_key` string
    - `recoveryEmail` object
      - `address` string
      - `verified` boolean
      - `verifiedAt` string
    - `relationships` object[]
      - `type` string
      - `value` string
    - `samba_service_user` boolean
    - `ssh_keys` Sshkeylist[]
      - `_id` string: The ID of the SSH key.
      - `create_date` string: The date the SSH key was created.
      - `name` string: The name of the SSH key.
      - `public_key` string: The Public SSH key.
    - `state` 'STAGED' | 'ACTIVATED' | 'SUSPENDED'
    - `sudo` boolean
    - `suspended` boolean
    - `tags` string[]
    - `totp_enabled` boolean
    - `unix_guid` integer
    - `unix_uid` integer
    - `username` string
    - `managedAppleId` string
    - `creationSource` string
    - `restrictedFields` RestrictedField[]
      - `field` 'addresses' | 'company' | 'costCenter' | 'department' | 'description' | 'displayname' | 'email' | 'employeeIdentifier' | 'employeeType' | 'firstname' | 'jobTitle' | 'lastname' | 'location' | 'middlename' | 'password' | 'phoneNumbers' | 'sudo' | 'username'
      - `type` 'active_directory' | 'federated_identity_provider' | 'scim'
      - `id` string
    - `memberof` string[]
  - `totalCount` integer: The total number of system users.

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api/revisions/0762c7d17a26?raw)
