---
title: "List all directories"
method: GET
path: "/directories"
tags: ["Directories"]
---

# List all directories

`GET /directories`

Returns a list of all directories for the instance.

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

A list of directories

- object
  - `data` Directory[], required
    - `object` 'directory', required — String representing the object's type. Always "directory".
    - `id` string, required — Unique identifier for the directory.
    - `name` string, required — A human-friendly name for the directory.
    - `enterprise_connection_id` string, nullable — The ID of the associated enterprise connection.
    - `endpoint_url` string, required — The provisioning endpoint URL for this directory.
    - `provider` string, required — The identity provider for this directory.
    - `enabled` boolean, required — Whether the directory is enabled.
    - `group_role_mapping_enabled` boolean, required — Whether group-to-role mapping is enabled for this directory.
    - `attribute_mapping` object, required — Mapping of user attributes to the directory attribute paths they are extracted from.
    - `custom_attributes` object[] — Custom attributes to map from the IdP to the user's profile via directory sync. Requires the custom attributes feature to be enabled for the instance.
      - `name` string — Display name for the custom attribute
      - `key` string — Key used to store the attribute in the user's public/private/unsafe metadata
      - `sso_path` string — Path to extract the attribute value from SSO claims (SAML assertions or OIDC claims)
      - `scim_path` string — The legacy name for `directory_path`. Carries the same value.
      - `directory_path` string — GJSON path to extract the attribute value from directory sync user resources
      - `multi_valued` boolean — When true, the attribute supports multiple values; values from the IdP are written to public_metadata as an array. Defaults to false.
    - `api_key` string, nullable — The API key for authenticating provisioning requests. Only returned when the directory is created or the key is rotated.
    - `created_at` integer, required — Unix timestamp when the directory was created.
    - `updated_at` integer, required — Unix timestamp when the directory was last updated.
  - `total_count` integer, required — Total number of directories.

## Other responses

- `401` — Authentication invalid
- `403` — Authorization invalid

---

[API](https://skmtc.net/clerk/apis/clerk-backend-api.md) · [All operations](https://skmtc.net/clerk/apis/clerk-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clerk/clerk-backend-api/revisions/75df3a43fcb2/schema)
