---
title: How to connect GitHub Copilot
canonical: "https://cloudmonitor.ai/docs/how-to/how-connect-github-copilot/"
description: "Generate a GitHub access token with Copilot metrics and billing scopes, then paste it into CloudMonitor to track seat cost, usage, and acceptance rates."
---

This guide creates a GitHub Personal Access Token (PAT) so CloudMonitor can read Copilot usage and billing data from your organization or enterprise. Allow about 10 minutes. You need to be an organization or enterprise **owner** to complete it.

:::tip
**Before you start**

- Confirm your plan: GitHub Copilot **Business** or **Enterprise**. Copilot for Individuals and the free tier are not supported by the metrics API.
- Open [github.com/settings](https://github.com/settings) in a separate tab.
:::

### Step 1 — Enable the Copilot Metrics policy

Open your organization or enterprise settings → **Copilot** → **Policies**. Set **Copilot metrics** to **Enabled everywhere**. Without this policy, GitHub's metrics endpoints return empty reports.

Enterprise admins can apply the policy across every child organization in one step.

### Step 2 — Create a token

CloudMonitor accepts either a classic PAT or a fine-grained personal access token. A GitHub App integration is on the roadmap and will become the preferred path; for now, a PAT is the supported method.

For a **classic PAT**, open [Personal access tokens (classic)](https://github.com/settings/tokens/new) and grant these scopes:

- `read:org` (organization scope) **or** `read:enterprise` (enterprise scope)
- `manage_billing:copilot` (organization) **or** `manage_billing:enterprise` (enterprise)

For a **fine-grained PAT**, open [Fine-grained tokens](https://github.com/settings/personal-access-tokens/new), select your organization as the resource owner, and grant:

- **Organization permissions** → Copilot business: **Read-only**
- **Organization permissions** → Members: **Read-only**

Set an expiry of 90 days or shorter. CloudMonitor reminds you to rotate the token 14 days before expiry.

### Step 3 — Add the token in CloudMonitor

In the CloudMonitor Admin App, go to **Settings** → **AI providers** → **GitHub Copilot** → **Add connector**.

Paste:

- The token from Step 2
- Your **organization slug** (e.g. `my-org`) or **enterprise slug** (e.g. `my-enterprise`)
- The scope: **Organization** or **Enterprise**

Click **Verify**.

### Step 4 — Confirm the 14-day backfill

CloudMonitor pulls the most recent 14 days of usage as proof the connector works. You should see:

- Active and engaged user counts per day
- IDE code completion volume broken down by editor, language, and model
- IDE chat counts
- Pull request summaries, if your team uses them

If the totals look right, click **Save**.

### Step 5 — Wait for the first full refresh

Polling runs daily at 06:00 UTC, after GitHub finalizes the previous day's report overnight. The first full day of data appears in your reports the morning after Step 4.

:::tip
**Troubleshooting**

- **0 active users in the report** — the Copilot Metrics policy in Step 1 isn't enabled. Re-check the policy scope.
- **403 from GitHub** — the token lacks `manage_billing:copilot` or the fine-grained equivalent. Re-issue with the correct scope.
- **Empty per-user breakdown** — GitHub only exposes per-user metrics from 2025-10-10 onward. Older days return aggregate-only.
:::

## What's next

- [How to read CloudMonitor's AI cost reports](/docs/how-to/how-interpret-ai-token-cost-reports/)
- [Does CloudMonitor see my AI prompts or responses?](/cloudmonitor-data-security-statement/)
