Configuring GitHub Copilot (Fine-Grained PAT)
Track GitHub Copilot adoption and usage using a fine-grained Personal Access Token (PAT) with scoped organization access and more granular permission control.
Overview
LinearB integrates with GitHub Copilot using a fine-grained Personal Access Token (PAT) to track AI adoption and usage with scoped organization access.
This integration provides more granular permission control compared to classic PATs and is suitable for organizations that require tighter security policies.
Before You Begin
- LinearB role: Company Admin
- GitHub permissions: Organization owner/admin
- Copilot Usage Metrics policy enabled in GitHub
- The GitHub user who creates the token must also have an organization role with the view organization Copilot metrics permission
Step 1 — Enable Copilot Usage Metrics in GitHub
Ensure that Copilot usage metrics are enabled in your GitHub organization settings.
- Required to retrieve Copilot usage data
- Missing permissions may result in 403 Unauthorized errors
Step 2 — Create a Fine-Grained Personal Access Token
- Create a fine-grained Personal Access Token in GitHub.
- Set the resource owner to the GitHub organization whose Copilot data you want to track.
- Scope the token to the relevant organization.
- Under Permissions, grant access to:
- GitHub Copilot metrics (read)
- Read-only access is sufficient. No write permissions are required.
- Copy and securely store the token.
Step 3 — Grant the Token Owner the Required Organization Role
The token owner must also have an organization role that includes the view organization Copilot metrics permission.
Without this role, GitHub Copilot metrics cannot be collected even if the token includes the required API permission.
Create the role
- In GitHub, go to Organization → Settings → Organization roles.
- Click Create role.
- Name the role (for example, Copilot View).
- Select the view organization Copilot metrics permission.
- Save the role.
Assign the role
- Go to Organization roles → Role assignments.
- Assign the role to the GitHub user who created the fine-grained PAT.
Step 4 — Connect Copilot in LinearB
- Go to Settings → Company Settings → AI Tools → GitHub Copilot.
- Paste the token.
- Select the organization scope.
- Click Save.
Once connected, Copilot data will begin syncing and appear in AI dashboards.
Historical Data & Backfill
- Up to 90 days of data may be backfilled
- Data updates on a daily cadence
Where Copilot Data Appears
- AI Tools Usage
- AI Adoption
- AI Insights Dashboard
- AI Analytics Dashboard
Troubleshooting
How did we do?
Configuring Cursor
Configuring GitHub Copilot (PAT Classic)