Skip to content

List the users holding an organization role

Use list_role_users to see which individual users currently hold a given organization role, whether granted directly or inherited through team membership.

  • github-org-identity installed.
  • A GitHub token resolvable via GITHUB_TOKEN or gh auth token, with the org’s admin:org scope or App-installation members/ organization_administration permission.
  • The numeric roleId you want to inspect — get it from list_organization_roles first if you don’t already have it.
  1. Ask for the tool with the org and the role’s numeric id:

    Use list_role_users for org my-org, roleId 8132.

  2. Read the result — an array of { "login": "...", "assignment": "..." }.

    assignment reflects how the user holds the role. Treat a null value as unknown, not as “direct” — the tool reports null rather than guessing whenever the underlying GitHub API response omits the field (this happens on older API responses).

  • missing_scope — no resolvable token.
  • github_api_error — the roleId doesn’t exist in this org, or the identity lacks org-roles read access.