---
title: "List directory group role mappings"
method: GET
path: "/directories/{directory_id}/group_role_mappings"
tags: ["Directories"]
---

# List directory group role mappings

`GET /directories/{directory_id}/group_role_mappings`

Returns the list of directory group to organization role mappings for a directory, ordered by precedence.

## Path parameters

- `directory_id` string, required

## Response `200`

A list of directory group role mappings, ordered by precedence.

- object
  - `data` DirectoryGroupRoleMapping[], required
    - `object` 'directory_group_role_mapping', required — String representing the object's type. Always "directory_group_role_mapping".
    - `id` string, required — Unique identifier for the directory group role mapping.
    - `directory_id` string, required — The ID of the directory this mapping belongs to.
    - `scim_directory_id` string, required — The legacy name for `directory_id`. Carries the same value.
    - `directory_group_id` string, required — The group ID from the identity provider.
    - `scim_group_id` string, required — The legacy name for `directory_group_id`. Carries the same value.
    - `directory_group_display_name` string, required — The display name of the group, as reported by the identity provider.
    - `scim_group_display_name` string, required — The legacy name for `directory_group_display_name`. Carries the same value.
    - `role` Role
      - `object` 'role', required
      - `id` string, required
      - `name` string, required
      - `key` string, required
      - `description` string, nullable, required
      - `is_creator_eligible` boolean, required — Whether this role is eligible to be an organization creator role
      - `permissions` Permission[], required
        - `object` 'permission', required
        - `id` string, required
        - `name` string, required
        - `key` string, required
        - `description` string, required
        - `type` string, required
        - `created_at` integer, required — Unix timestamp of creation.
        - `updated_at` integer, required — Unix timestamp of last update.
      - `created_at` integer, required — Unix timestamp of creation.
      - `updated_at` integer, required — Unix timestamp of last update.
    - `precedence` integer, required — Mapping precedence, starting at 1. Lower values take priority when a user belongs to multiple mapped groups.
    - `created_at` integer, required — Unix timestamp (milliseconds) of when the mapping was created.
    - `updated_at` integer, required — Unix timestamp (milliseconds) of when the mapping was last updated.
  - `total_count` integer, required — Total number of directory group role mappings in the directory.

## Other responses

- `401` — Authentication invalid
- `403` — Authorization invalid
- `404` — Resource not found

---

[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)
