Troubleshoot GitHub Copilot integrations
Resolve GitHub Copilot connection errors, token and permission problems, missing organizations, absent data, and unexpected adoption results.
Overview
Use this guide to resolve connection, authentication, permission, organization-scope, and data-availability issues affecting GitHub Copilot integrations.
Before troubleshooting, identify the configured connection type:
- Classic token
- Fine-grained token
- Enterprise
The required permissions and organization scope differ between connection types.
Understand the Integration Status
Connected
The integration is active and LinearB can request data from GitHub. If data is missing, review the organization scope, user activity, processing time, and user mapping.
Connected with an Error
An active integration with a validation or collection error remains under Connected and displays an error indicator.
Common causes include an expired or revoked token, missing permissions, disabled Copilot usage metrics, or an inaccessible organization.
Disconnected
LinearB is no longer collecting new data through the integration. Previously collected data is preserved, and the integration remains available under Disconnected.
403 AiMetricsUnauthorizedException
Symptoms:
- The connection fails during setup or validation.
- The integration displays an error.
- No Copilot data appears in LinearB.
- GitHub returns a 403 authorization error.
Possible causes:
- Copilot usage metrics are not enabled in GitHub.
- The token does not have the required permissions.
- The token owner cannot view Copilot metrics.
- The token has not been approved by the organization or Enterprise.
Resolution:
- Enable Copilot usage metrics in the relevant GitHub organization or Enterprise.
- Verify the permissions required by the configured connection type.
- Confirm that the token owner can access Copilot metrics.
- Complete any required organization or Enterprise token approval.
- If the integration is connected, select it and click Edit.
- Update the token or configuration and click Save changes.
If the integration is disconnected, select it under Disconnected, click Reconnect, and enter replacement credentials when prompted.
Classic Token Permission Errors
A classic Personal Access Token used by LinearB requires:
read:userread:org
Also verify that:
- The token is a classic PAT.
- The token owner can access every organization selected in LinearB.
- The token is authorized for SAML single sign-on where required.
- The token has not expired or been revoked.
Authorize a classic token for SAML SSO
If your GitHub organization uses SAML single sign-on (SSO), the classic Personal Access Token must be authorized for that organization. Without this authorization, the Copilot integration may disconnect or lose access to organization data.
- In GitHub, open your profile menu and select Settings.
- Select Developer settings.
- Open Personal access tokens → Tokens (classic).
- Locate the token used by the LinearB Copilot integration.
- Click Configure SSO.
- Click Authorize next to the relevant GitHub organization.
After authorization, return to the affected integration in LinearB. Use Edit if it remains connected with an error, or Reconnect if it appears under Disconnected.
Configuration guide:
Fine-Grained Token Permission Errors
A fine-grained PAT used by LinearB requires the following organization permissions:
- Organization Copilot metrics: Read-only
- Members: Read-only
Also verify that:
- The correct organization is selected as the token’s resource owner.
- The token has been approved by the organization, if approval is required.
- The token owner has an organization role that permits viewing Copilot metrics.
- The token has not expired or been revoked.
Configuration guide:
Enterprise Connection Errors
Verify that:
- The token owner can access the GitHub Enterprise account.
- The token can read Copilot metrics for the required Enterprise scope.
- Copilot usage metrics are enabled for the Enterprise and relevant organizations.
- The configured Enterprise and organization details are correct.
- Any required Enterprise approval has been completed.
For a GitHub Enterprise Cloud environment hosted on
*.ghe.com, also verify:
-
The token was created in the correct
*.ghe.comtenant. - The Enterprise subdomain is correct.
- The integration uses the correct Enterprise API environment.
Configuration guides:
The Token Expired or Was Revoked
Symptoms:
- The integration previously worked but now displays an error.
- New Copilot data no longer appears.
- GitHub rejects the saved token.
Update a connected integration
- Create a replacement token with the permissions required by the current connection type.
- Go to Settings → Company Settings → AI Tools → Integrations.
- Select Connected.
- Select the affected GitHub Copilot integration.
- Under Main Settings, click Edit.
- Enter the replacement token.
- Click Save changes.
Saving the edit does not delete previously collected Copilot metrics.
- Fine-grained token changes trigger recollection of up to 90 days of recent data.
- Classic token-only changes are picked up during scheduled daily collection.
- Recollected records are updated in place and are not counted twice.
Update a disconnected integration
- Create the replacement token in GitHub.
- Open Settings → Company Settings → AI Tools → Integrations.
- Select Disconnected.
- Select the affected GitHub Copilot integration.
- Click Reconnect.
- Enter the replacement token when prompted.
- Complete validation to restore the integration.
Reconnect a Disconnected Integration
- Go to Settings → Company Settings → AI Tools → Integrations.
- Select Disconnected.
- Select the GitHub Copilot integration.
- Click Reconnect.
- Review the saved configuration and enter a replacement token if required.
- Complete validation to restore the integration.
LinearB resumes collecting new data when validation succeeds.
Another Integration Uses the Same Connection Type
Only one active GitHub Copilot integration using the same provider and connection type can be connected at a time.
For example:
- Two Classic token integrations cannot be active simultaneously.
- Two Fine-grained token integrations cannot be active simultaneously.
- A failing integration still counts as active.
To restore a previous integration of the same type:
- Select Connected.
- Select the currently active integration using that connection type.
- Click Disconnect and confirm the action.
- Select Disconnected.
- Select the previous integration.
- Click Reconnect.
- Complete validation.
No Data Appears After a Successful Connection
Possible causes:
- The initial historical import or daily processing has not completed.
- Copilot is enabled but developers are not actively using it.
- The expected organizations are not included in the integration scope.
- GitHub users are not mapped to LinearB users.
- Copilot usage metrics are not fully enabled.
Resolution:
- Allow time for the initial import and daily processing.
- Confirm recent Copilot activity in GitHub.
- Review the organizations included in the integration.
- Verify GitHub-to-LinearB user mapping.
- Confirm that Copilot usage metrics are enabled.
- Confirm that the integration appears under Connected without an error indicator.
Expected Organizations Are Missing
Possible causes:
- The token owner cannot access the missing organizations.
- The token is not authorized for the organization.
- The Classic token organization filter excludes the organization.
- A Fine-grained token was created for a different resource owner.
- The organization is outside the configured Enterprise scope.
Resolution:
- Confirm that the token owner can access the organization.
- Complete any required SAML, organization, or Enterprise authorization.
- Review manual or regular-expression organization selection.
- Confirm that a Fine-grained token uses the correct resource owner.
- Verify the Enterprise organization scope.
- For a Classic token integration, select the integration, click Edit, update the organization selection, and click Save changes.
User-Level Data Is Missing
Organization-level Copilot data can appear even when individual users are not mapped correctly.
Possible causes:
- GitHub users are not mapped to LinearB users.
- The token cannot read organization members.
- The expected users belong to an organization outside the integration scope.
Resolution:
- Verify GitHub-to-LinearB user mapping.
- For a Fine-grained token, confirm that Members is set to Read-only.
- Confirm that the relevant organization is included.
Adoption Rate Is Above 100%
Copilot usage can be measured across an entire GitHub organization while Git activity in LinearB covers only a subset of that organization’s repositories.
If Copilot users exist outside the repositories connected to LinearB, the number of Copilot users can exceed the number of Git-active users used as the comparison population.
Resolution:
- Expand repository coverage in LinearB where appropriate.
- Align the GitHub organization scope with the repositories measured in LinearB.
- Confirm that the selected teams and reporting scope represent the same user population.
Still Experiencing Issues?
If the problem persists after completing the relevant checks, contact LinearB Support .
Related Articles
How did we do?
Connect Kiro to LinearB