Users

List all users for a tenant

To list all users for a tenant, send a GET request to /v2/users.

The response will have up to 1000 items. The response will be empty if the page size is not specified (i.e., the default). By default, the list is in ascending order by create_time. The maximum and default page sizes are subject to change.

When paginating, use the skip parameter as the offset.

When filtering, the response will only show users that satisfy this filter. The syntax follows the SCIM grammar from RFC7644 Section 3.4.2.2.

The supported operations are:

  • pr (present)
  • eq (equals)
  • ne (not equals)
  • co (contains)
  • sw (starts with)
  • ew (ends with)
  • gt (greater than)
  • lt (less than)
  • ge (greater than or equal to)
  • le (less than or equal to)

The supported fields and their supported operations are:

  • id (eq, ne, co, sw, ew)
  • email_address (eq, ne, co, sw, ew)
  • external_id (eq, ne, co, sw, ew)
  • username (eq, ne, co, sw, ew)
  • display_name (eq, ne, co, sw, ew)
  • state (eq, ne, co, sw, ew)
  • source (eq, ne, co, sw, ew)
  • last_auth_time (pr, eq, ne, gt, lt, ge, le)
  • has_active_passkey (eq, ne)

When sorting, use the order_by parameter. It's a comma-delimited list of attributes. Currently, the following fields are supported:

  • display_name
  • username
  • email_address
  • status
  • source
  • last_auth_time

The default sorting order per attribute is ascending. Therefore, if you want descending order, append the " desc" suffix to the attribute name.

get/v2/users

Request

Query parameters

page_sizeinteger

The number of items returned per page. The response may include this exact number or fewer. If omitting this value, the response returns the default number of results the method allows.

skipinteger

Number of items to skip. This is the zero-based index of the first result.

filterstring

Filter query for responses.

The syntax follows the SCIM grammar from RFC7644 Section 3.4.2.2.

The supported operations are:

  • pr (present)
  • eq (equals)
  • ne (not equals)
  • co (contains)
  • sw (starts with)
  • ew (ends with)
  • gt (greater than)
  • lt (less than)
  • ge (greater than or equal to)
  • le (less than or equal to)

See individual methods for the supported attributes and operations.

Ex. name co "alice"

order_bystring

A comma-delimited list of attributes to sort results.

The default sorting order per attribute is ascending. Therefore, if you want descending order, append the " desc" suffix to the attribute name.

Ex. name desc

Response

The response is a JSON object with users and total_size keys. <br />

  • users is set to an array of user objects containing standard user attributes.
  • total_size is set to the total number of items matched by the list request. If more items are to be returned by the requested query, make another request using the skip query parameter.
total_sizeinteger required

The total number of results returned by the operation. This value may be larger than the number of resources returned, such as when returning a single page where multiple pages are available.

Example response

{
  "users": [
    {
      "id": "e7bb3e0b-91fd-432a-bc96-55801329adbf",
      "create_time": "2022-04-12T05:53:07.119Z",
      "update_time": "2022-06-16T14:31:03.770Z",
      "last_auth_time": "2022-06-16T14:31:03.770Z",
      "tenant_id": "acme-corp",
      "external_id": "0001f1f460b1ace6",
      "email_address": "alice@acmecorp.com",
      "username": "alice.acmecorp",
      "display_name": "Alice Acmecorp",
      "state": "ACTIVE",
      "source": "scim",
      "has_active_passkey": true
    }
  ],
  "total_size": 1000
}

Changes

No recorded changes to this operation across all 1 revision of this API.