---
title: "List users that are assigned to an enterprise role"
method: GET
path: "/enterprises/{enterprise}/enterprise-roles/{role_id}/users"
tags: ["enterprise-admin"]
---

# List users that are assigned to an enterprise role

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

Lists enterprise members that are assigned to an enterprise role.

To use this endpoint, a 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 `enterprise:admin` scope to access this endpoint.

## Path parameters

- `enterprise` string, required
- `role_id` integer, required

## Query parameters

- `per_page` integer
- `page` integer

## Response `200`

Response - List of assigned users

- EnterpriseUserRoleAssignment[] — List of users assigned to the enterprise role
  - `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
  - `assignment` 'direct' | 'indirect' | 'mixed' — Determines if the user has a direct, indirect, or mixed relationship to a role
  - `inherited_from` EnterpriseTeam[] — Enterprise Team the user has gotten the role through
    - `id` integer, required
    - `name` string, required
    - `description` string
    - `slug` string, required
    - `url` string, uri, required
    - `sync_to_organizations` string — Retired: this field will not be returned with GHEC enterprise teams.
    - `organization_selection_type` string
    - `group_id` string, nullable, required
    - `group_name` string, nullable — Retired: this field will not be returned with GHEC enterprise teams.
    - `html_url` string, uri, required
    - `members_url` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `notification_setting` 'notifications_enabled' | 'notifications_disabled' — Whether team members will receive notifications when the team is mentioned.

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