---
title: "List all available roles for an organization"
method: GET
path: "/v1/organizations/{organizationId}/roles"
tags: ["Role Management"]
---

# List all available roles for an organization

`GET /v1/organizations/{organizationId}/roles`

## Request

- Base URL: `https://api.clickhouse.cloud`
- URL: `https://api.clickhouse.cloud/v1/organizations/{organizationId}/roles`
- Auth: HTTP basic

Returns available roles (system + custom) for an organization, ordered by unique role ID ascending. Results are capped at `limit` (default and maximum 250) per page. Pass `nextCursor` as the `cursor` query parameter to fetch the next page until it is null.

## Path parameters

- `organizationId` string, uuid, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` RBACRole[]: List of results.
    - `id` string: Unique role identifier
    - `tenantId` string: Tenant resource ID (e.g., organization/uuid)
    - `ownerId` string: Owner resource ID (e.g., organization/uuid)
    - `name` string: Name of the role
    - `type` 'system' | 'custom': Whether this is a system role or a custom role
    - `actors` string[]: List of actor resource IDs assigned to this role (e.g., user/uuid, apiKey/uuid)
    - `policies` RBACPolicy[]: List of policies associated with this role
      - `id` string: Unique policy identifier
      - `roleId` string: ID of the role this policy belongs to
      - `tenantId` string: Tenant resource ID (e.g., organization/uuid)
      - `allowDeny` 'ALLOW' | 'DENY': Whether this policy allows or denies access
      - `permissions` string[]: List of permissions granted or denied by this policy
      - `resources` string[]: List of resource IDs this policy applies to (e.g., instance/uuid, instance/*)
      - `tags` RBACPolicyTags
        - `grants` string[]: Optional list of database grants (e.g., database names)
        - `roleV2` 'sql-console-readonly' | 'sql-console-admin': Optional SQL console role type
    - `createdAt` string, date-time: Timestamp when the role was created. ISO-8601.
    - `updatedAt` string, date-time: Timestamp when the role was last updated. ISO-8601.
  - `limit` integer: Maximum number of results returned in this page.
  - `nextCursor` string, nullable: Cursor for the next page, to be sent as the `cursor` query parameter. Null on the last page.

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

## Changes

- **2026-11-17** `c0b2c701c12e`: 4 info
  - added the new optional `query` request parameter `cursor`
  - added the new optional `query` request parameter `limit`
  - added the optional property `limit` to the response with the `200` status
  - added the optional property `nextCursor` to the response with the `200` status

[Operation history](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/changes/v1/organizations/:organizationId/roles/get.md)

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
