Skip to content
Dashboard
Theme
Theme

List compatible directory_users

GET /compat/workos/directory_users: List compatible directory_users.

View Markdown

GET /compat/workos/directory_users

Exactly one of directory or group is required. Supplying neither or both, or both before and after, returns 422.

Scope
directory_data:read
Auth
Secret key (sk_…)
Since
1.0
  • limit integer

    min 1 · max 100 · default 10

  • before string

    min length 1 · max length 2048

  • after string

    min length 1 · max length 2048

  • order string

    one of asc, desc · default "desc"

  • directory string

    min length 1 · max length 2048

  • group string

    min length 1 · max length 2048

  • 200 OK WorkOSDirectoryUserList
  • 401 A secret API key is required. WorkOSDsyncError
  • 403 The secret key lacks the required scope. WorkOSDsyncError
  • 404 The resource is absent or compatibility is disabled. WorkOSDsyncError
  • 422 Invalid compatibility filter or cursor. WorkOSDsyncError
  • default WorkOS compatibility refusal; invalid filters and cursors use 422. WorkOSDsyncError

Errors share one shape; see the error code catalogue.

curl -X GET \
"https://api.ohauthcat.com/compat/workos/directory_users" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY"
Response 200
{
"object": "list",
"data": [
{
"id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "directory_user",
"organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"directory_id": "dir_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"idp_id": "0oa1b2c3d4E5F6g7h8i9",
"email": "jane@acme.com",
"state": "active",
"first_name": "Jane",
"last_name": "Doe",
"emails": [
{
"value": "enterprise"
}
],
"groups": [
{
"id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "directory_group",
"organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"directory_id": "dir_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"idp_id": "0oa1b2c3d4E5F6g7h8i9",
"name": "Acme Corp",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}
],
"role": {
"slug": "acme"
},
"custom_attributes": {},
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}
],
"list_metadata": {
"before": "cur_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"after": "cur_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
}
}