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

# Get an enterprise role

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

Gets a custom enterprise role that is available within the 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
- `role_id` integer, required

## Response `200`

Response

- EnterpriseRole — Enterprise custom roles
  - `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-2.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-2/versions/8ae6d0c8716e/schema)
