---
title: "Get all organization roles for an organization"
method: GET
path: "/orgs/{org}/organization-roles"
tags: ["orgs"]
---

# Get all organization roles for an organization

`GET /orgs/{org}/organization-roles`

Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

To use this endpoint, the authenticated user must be one of:

- An administrator for the organization.
- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)."

OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

## Path parameters

- `org` string, required

## Response `200`

Response - list of organization roles

- object
  - `total_count` integer — The total number of organization roles available to the organization.
  - `roles` OrganizationRole[] — The list of organization roles available to the organization.
    - `id` integer, required — The unique identifier of the role.
    - `name` string, required — The name of the role.
    - `description` string, nullable — A short description about who this role is for or what permissions it grants.
    - `base_role` 'read' | 'triage' | 'write' | 'maintain' | 'admin', nullable — The system role from which this role inherits permissions.
    - `source` 'Organization' | 'Enterprise' | 'Predefined', nullable — Source answers the question, "where did this role come from?"
    - `permissions` string[], required — A list of permissions included in this role.
    - `organization` NullableSimpleUser, nullable, required — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
    - `created_at` string, date-time, required — The date and time the role was created.
    - `updated_at` string, date-time, required — The date and time the role was last updated.

## Other responses

- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
