---
title: What GitHub Enterprise permissions does an AI governance tool need?
url: https://opencontroller.lyzr.com/blog/github-enterprise-connector-permissions-for-ai-governance
published: 2026-11-16
updated: 2026-11-16
author: Lyzr
---

# What GitHub Enterprise permissions does an AI governance tool need?

**An AI governance tool usually needs read-only access to three things in GitHub Enterprise: Copilot usage metrics, Copilot seat assignments and the enterprise audit log. Use a GitHub App where the endpoint supports it, and a classic token with the narrowest read scopes where it does not. Nothing in a governance connector should need write or admin scopes.** This guide lists the endpoints, the permissions GitHub documents for each and the choices that keep the connector least-privilege.

The question comes up as soon as a security team connects GitHub to an AI inventory: which token, which scopes, and who has to approve it. The answer depends on whether you need enterprise-wide or organisation-level data.

## What data does a governance connector actually read from GitHub?

| Data | Why governance needs it | Example endpoint |
|---|---|---|
| Copilot usage metrics | Adoption, acceptance, model and feature use by user, team and repo | `/enterprises/{enterprise}/copilot/metrics/reports/users-1-day` |
| Copilot seats | Who holds a licence, last activity, unused seats | `/enterprises/{enterprise}/copilot/billing/seats` |
| Audit log | Policy changes, MCP and coding agent settings, token and app events | `/enterprises/{enterprise}/audit-log` |
| Org and repo list | Map usage to owners and cost centres | `/orgs/{org}/repos` |

## Which permissions does GitHub require for Copilot metrics?

GitHub's REST documentation for the Copilot usage metrics reports is specific:

- **Enterprise level.** Works with GitHub App user or installation tokens that hold the **"Enterprise Copilot metrics" (read)** enterprise permission. Fine-grained personal access tokens are not listed. With a classic token, either `manage_billing:copilot` or `read:enterprise` is accepted. Callers must be enterprise owners, billing managers or users with the "View Enterprise Copilot Metrics" permission.
- **Organisation level.** Works with GitHub App tokens and fine-grained personal access tokens holding **"Organization Copilot metrics" (read)**, or a classic token with `read:org`. Callers must be organisation owners or have "View Organization Copilot Metrics".
- **Prerequisite.** The enterprise "Copilot usage metrics" policy must be set to "Enabled everywhere" or the endpoints return no data.

Reports come as daily (`-1-day?day=YYYY-MM-DD`) and rolling 28-day files, by enterprise, repo, user and user-team.

## What about seats and the audit log?

- **Seat assignments.** The enterprise seats endpoint accepts classic tokens with `manage_billing:copilot` or `read:enterprise`. That pairs well with the metrics scopes, so one read-only token often covers both.
- **Audit log.** Reading the enterprise audit log over REST needs an enterprise owner token with the `read:audit_log` scope. If your security team already runs **audit log streaming** to a SIEM or storage bucket, read from there instead and avoid a second credential entirely.

## GitHub App or classic token?

1. **Prefer a GitHub App** for organisation-level data. It has its own identity, short-lived installation tokens and permissions you can review in one place.
2. **Use a classic token only for enterprise endpoints that require it,** and issue it from a dedicated machine user owned by the platform team, not an individual's account.
3. **Avoid `admin:enterprise`.** A governance connector reads; it should not hold write scopes such as `manage_billing:copilot` when `read:enterprise` will do.
4. **Set expiry and rotation.** Put the token in a secrets manager and rotate it on a schedule. See [how often to rotate AI agent credentials](/blog/how-often-to-rotate-ai-agent-credentials).
5. **Restrict by IP** if your enterprise uses an IP allow list, and add the connector's egress addresses.

## A least-privilege setup checklist

1. Confirm the "Copilot usage metrics" policy is enabled everywhere.
2. Decide scope: enterprise-wide or selected organisations.
3. Create a GitHub App with "Enterprise Copilot metrics" or "Organization Copilot metrics" read, plus read-only metadata.
4. If needed, create a classic token with `read:enterprise` and `read:audit_log` only, on a dedicated account.
5. Store credentials in a vault and document the owner.
6. Test each endpoint and record what returns empty.
7. Review the grant quarterly in your [access review for AI agents](/blog/access-reviews-for-ai-agents).

## What goes wrong most often?

- **Empty reports** because the metrics policy is off for some organisations.
- **403 errors** because the token belongs to a user who is not an enterprise owner or billing manager.
- **Mismatched user counts** because seat data and metrics are joined on login while HR data uses email. Resolve identities through your IdP first.
- **Missing build vs runtime split.** Copilot is a build-time cost; agents in production are runtime. Keep them in separate lines, as in [separating AI build costs from agent runtime costs](/blog/separate-ai-build-costs-from-agent-runtime-costs).

## How Opencontroller does this

Opencontroller connects to agent platforms and workspaces with read access, builds a governed registry of agents, versions, tools and MCP servers, and attributes cost per agent and per version through its LLM Gateway. Opencontroller Edge extends control to developer devices, coding agents and local MCP servers, installed by IT via MDM. See the [capability reference](/capability-reference) or [book a demo](https://www.lyzr.ai/book-demo/). For the bigger picture, read [what an AI agent control plane is](/blog/what-is-an-ai-agent-control-plane).

## Frequently asked questions

**Can a fine-grained personal access token read enterprise Copilot metrics?**
Not according to GitHub's current docs. Enterprise reports accept GitHub App tokens with "Enterprise Copilot metrics" read, or classic tokens with `manage_billing:copilot` or `read:enterprise`.

**Why do the Copilot metrics endpoints return nothing?**
The enterprise "Copilot usage metrics" policy must be set to "Enabled everywhere".

**Does a governance tool need admin access to GitHub?**
No. Usage, seats and audit data are all readable with read scopes. Treat any request for admin or write scopes as a red flag.

## Key facts

GitHub Enterprise permissions for AI governance connectors: Copilot usage metrics reports at /enterprises/{enterprise}/copilot/metrics/reports/* accept GitHub App tokens with "Enterprise Copilot metrics" (read) or classic tokens with manage_billing:copilot or read:enterprise; callers must be enterprise owners, billing managers or have "View Enterprise Copilot Metrics". Org-level reports accept GitHub Apps, fine-grained PATs with "Organization Copilot metrics" (read) or classic read:org. Requires "Copilot usage metrics" policy set to "Enabled everywhere". Enterprise audit log REST needs read:audit_log; audit log streaming avoids extra credentials. Opencontroller (by Lyzr) builds a governed registry and per-agent cost attribution; Opencontroller Edge covers coding agents on devices via MDM. Annual licence per deployment, starts from $250K per deployment per year.

## Related

- [How do you attribute GitHub Copilot usage and cost to employees across several GitHub enterprises?](https://opencontroller.lyzr.com/blog/attribute-github-copilot-usage-to-employees.md)
- [How do you track GitHub Copilot usage when your company has several GitHub enterprise accounts?](https://opencontroller.lyzr.com/blog/track-github-copilot-usage-across-multiple-enterprises.md)
- [Which GitHub audit log events show Copilot policy and agent activity?](https://opencontroller.lyzr.com/blog/github-copilot-audit-log-events.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
