---
title: "Get all enterprise roles for an enterprise"
method: GET
path: "/enterprises/{enterprise}/enterprise-roles"
tags: ["enterprise-admin"]
---

# Get all enterprise roles for an enterprise

`GET /enterprises/{enterprise}/enterprise-roles`

Lists the enterprise roles available in this enterprise.

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

  - An administrator for the enterprise.
  - A user, or a user on a team, with the fine-grained permission `read_enterprise_custom_enterprise_role` in the enterprise.

OAuth app tokens and personal access tokens (classic) require the `read:enterprise` scope to access this endpoint.

## Path parameters

- `enterprise` string, required

## Response `200`

Response - list of enterprise roles

- object
  - `total_count` integer — The total number of enterprise roles available to the enterprise.
  - `roles` EnterpriseRole[] — The list of enterprise roles available to the enterprise.
    - `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.
    - `source` 'Enterprise' | 'Predefined', nullable — Source answers the question, "where did this role come from?"
    - `permissions` string[], required — A list of permissions included in this role.
    - `enterprise` NullableEnterprise, nullable, required — An enterprise on GitHub.
      - `description` string, nullable — A short description of the enterprise.
      - `html_url` string, uri, required
      - `website_url` string, uri, nullable — The enterprise's website URL.
      - `id` integer, required — Unique identifier of the enterprise
      - `node_id` string, required
      - `name` string, required — The name of the enterprise.
      - `slug` string, required — The slug url identifier for the enterprise.
      - `created_at` string, date-time, nullable, required
      - `updated_at` string, date-time, nullable, required
      - `avatar_url` string, uri, required
    - `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

- `403` — Forbidden
- `404` — Resource not found

---

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