v4

latestOpenAPI 3.1.1Apache 2.02026-07-31107278570.4 KB
Directory

List directory users

Retrieves a list of all users within a specified directory for an organization. This endpoint allows you to view user accounts associated with your connected Directory Providers.

get/api/v1/organizations/{organization_id}/directories/{directory_id}/users

Path parameters

organization_idstring required

Unique identifier of the organization

directory_idstring required

Unique identifier of the directory within the organization

Query parameters

page_sizeinteger

Number of users to return per page. Maximum value is 30. If not specified, defaults to 10

page_tokenstring

Token for pagination. Use the value returned in the 'next_page_token' field of the previous response to retrieve the next page of results

include_detailboolean

If set to true, the response will include the full user payload with all available details. If false or not specified, only essential user information will be returned

directory_group_idstring

Filter users by their membership in a specific directory group

updated_afterstring date-time

Filter users that were updated after the specified timestamp. Use ISO 8601 format

Response

Successfully retrieved the list of users from the specified directory

next_page_tokenstring

Token for pagination. Use this token in the 'page_token' field of the next request to fetch the subsequent page of users

prev_page_tokenstring

Token for pagination. Use this token in the 'page_token' field of the next request to fetch the prior page of users

total_sizeinteger

Total number of users available in the directory that match the request criteria

Example response

{
  "users": [
    {
      "email": "johndoe",
      "family_name": "Doe",
      "given_name": "John",
      "groups": [
        {
          "display_name": "Admins",
          "id": "dirgroup_121312434123312",
          "total_users": 10,
          "updated_at": "2024-10-01T00:00:00Z"
        }
      ],
      "id": "diruser_121312434123312",
      "preferred_username": "johndoe",
      "updated_at": "2024-10-01T00:00:00Z"
    }
  ]
}