Identities

List Identities for a Realm

Changed on

To list identities for a realm, send a GET request to /v1/tenants/$TENANT_ID/realms/$REALM_ID/identities.

The response will only contain identities matching the filter in the request. If no filter is provided, the request will match all identities in the realm. Currently, the only supported filter is traits.username eq "$USERNAME".

The response will contain at most 200 items and may contain a page token to query the remaining items. If page size is not specified, the response will contain 20 items. There is no defined ordering of the list of identities in the response. Note that the maximum and default page sizes are subject to change.

When paginating, the page size is maintained by the page token but may be overridden on subsequent requests. The filter is also maintained by the page token but it may not be overridden. If specified, the request filter must match the filter maintained by the page token, otherwise you will receive a 400 error. The skip is not maintained by the page token and must be specified on each subsequent request.

Page tokens expire after one week. Requests which specify an expired page token will result in undefined behavior.

get/v1/tenants/{tenant_id}/realms/{realm_id}/identities

Request

Path parameters

tenant_idstring required
Example:000176d94fd7b4d1

A unique identifier for a tenant.

realm_idstring required
Example:19a95130480dfa79

A unique identifier for a realm.

Query parameters

filterstring

Filter to constrain the response. The response will only include resources matching this filter. Filters follow the SCIM grammar from RFC-7644 Section 3.4.2.2.

page_sizeinteger

Number of items returned per page. The response will include at most this many results but may include fewer. If this value is omitted, the response will return the default number of results allowed by the method.

page_tokenstring

Token to retrieve the subsequent page of the previous request. All other parameters to the list endpoint should match the original request that provided this token unless otherwise specified.

skipinteger

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

Response

The response will be a JSON object with keys for identities and total_size. identities will be set to an array of identity objects, each of which contains the standard identity attributes. total_size will be set to the total number of items matched by the list request. If there are more items to be returned by the requested query, the response will also contain a key called next_page_token.

total_sizeinteger required

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.

next_page_tokenstring

Token used to fetch the next set of results. If this field is omitted, there are no subsequent pages.

Example response

{
  "identities": [
    {
      "id": "e372db224c06e850",
      "realm_id": "8f5bec58229e6f29",
      "tenant_id": "0001f1f460b1ace6",
      "display_name": "Test Display",
      "create_time": "2022-04-12T05:53:07.119Z",
      "update_time": "2022-06-16T14:31:03.770Z",
      "status": "active",
      "traits": {
        "type": "traits_v0",
        "username": "test",
        "primary_email_address": "test@example.com"
      },
      "enrollment_status": "ENROLLED"
    }
  ],
  "total_size": 1000
}

Changes

    • info

      added the optional property // to the response with the status