GitHub Copilot SDK and agent authentication

Copilot SDK Server-to-Server Auth: Setup and Billing

•Make Better Editorial

GitHub Copilot SDK now supports organization-owned app authentication in public preview. Compare GitHub Actions and external services, token rotation, AI credits and budget limits.

GitHub announced public-preview server-to-server authentication for the Copilot SDK on October 27, 2026. An organization-installed GitHub App can now make Copilot requests for an automated service without relying on a particular employee's signed-in account. The change is especially relevant to teams running long-lived agents, background jobs or external CI systems that need an organization-owned identity.

This is an authentication and billing change, not a new Copilot model or a claim that every SDK deployment is production-ready. The feature is still in public preview. GitHub's official documentation distinguishes two implementation paths: the built-in token for eligible GitHub Actions workflows, and a GitHub App installation token for services outside GitHub Actions.

Two authentication paths: choose the right one

Copilot SDK authentication by execution environment

GitHub Actions in an organization repositoryExternal CI or hosted agent service
Use the workflow's built-in GITHUB_TOKEN.Use a GitHub App installed on the billing organization.
Grant copilot-requests: write in the workflow permissions.Grant the app read-only organization Copilot Requests permission.
Enable the organization's CLI-billed-to-organization policy.Enable organization support for app-installation Copilot requests.
No separate GitHub App or stored authentication secret required for this path.Mint a short-lived installation access token and pass it explicitly to the SDK.

The permissions sound counterintuitive: GitHub Actions uses copilot-requests: write, while the GitHub App uses a permission labeled Read-only. They are different authentication routes. Read-only on the app does not mean its requests are free; GitHub says they consume the owning organization's AI credits. The Actions-specific CLI policy also does not govern the external-app token path.

Set up an external Copilot SDK service

  1. Create a GitHub App with the organization Copilot Requests permission set to Read-only; review any other permissions it asks for.
  2. Install the app on the organization that should own and pay for its usage. Confirm the organization allows Copilot requests through app installations.
  3. Generate an installation access token with organization_copilot_requests set to read; GitHub says installation tokens expire after one hour.
  4. Pass the token through the SDK's explicit gitHubToken/github_token option. If disabling user credential discovery, do not rely on an automatically discovered environment token.
  5. Rotate the installation token before expiry and restart the relevant SDK client or runtime as GitHub's guide instructs. Test authorization, model policy and budget behavior with a low-volume request.
Preview and security boundary

This capability is in public preview, and GitHub says organization-installed apps are eligible—not personal-account or enterprise-level installations. Never treat a short-lived token as permission to skip secret storage hygiene, least-privilege review or human oversight of high-impact agent actions.

Billing, attribution and the missing per-app budget

For GitHub App authentication, the organization owning the installation pays for Copilot usage. Its model policies and organization-level budgets apply, but GitHub does not currently provide a budget for one app or one installation. That makes shared-budget governance important: an experimental service and a business-critical agent may consume the same organization-level allowance unless the team monitors them operationally.

Administrators can trace app-attributed usage in exported AI usage CSV reports using the app_client_id column. GitHub says this detail is not available in the ordinary AI usage view. To identify the app, match that client ID against the organization's app installations. A budget configured only to send alerts will not stop spending; GitHub documents a separate Stop usage when budget limit is reached setting.

What to verify before putting an agent on a schedule

Make Better analysis

A useful first pilot is a single low-risk background job with a fixed request budget, explicit token rotation and an owner responsible for the app installation. Record its client ID, expected model, run frequency and a rollback path. Watch both API failures and spending: a 401 can indicate an expired token, while a 403 may indicate missing app permission, an organization setting or a model policy. These are operational checks, not independently measured reliability guarantees.

For teams already using GitHub Actions, the built-in token may be simpler because it avoids managing a separate GitHub App for that workflow. For a service hosted elsewhere, app-based authentication avoids tying the agent's identity to one employee. Neither option removes the need to validate outputs, protect credentials, control tool permissions and audit costs. Keep the distinction clear when documenting internal AI-agent architecture.

FAQ

Questions people ask

Does Copilot SDK server-to-server authentication need a signed-in user?

No. GitHub's October 27 public preview lets a service authenticate through a GitHub App installed on an organization, rather than borrowing a developer's personal credentials. The app needs the organization's read-only Copilot Requests permission and a short-lived installation token passed explicitly to the SDK. Personal-account and enterprise-level installations do not qualify for this authentication path, according to GitHub Docs.

Should I use a GitHub App token or GITHUB_TOKEN in GitHub Actions?

Use the built-in GITHUB_TOKEN for an eligible workflow in an organization-owned GitHub Actions repository, with copilot-requests: write permission and the relevant organization CLI billing policy enabled. For an external CI system or hosted service, GitHub documents a different path: install a GitHub App on the organization and supply its installation access token to the Copilot SDK. Do not assume the two paths share identical permissions or billing controls.

Does read-only Copilot Requests permission mean the GitHub App cannot spend AI credits?

No. GitHub explicitly says that read-only Copilot Requests permission authorizes an installed app to make billable Copilot requests; read-only describes the permission scope, not a free-usage guarantee. Usage is charged to the organization that owns the installation and is subject to its allowed models and spending controls. Organization owners should review the app's purpose and expected usage before approving access.

Can admins set a Copilot budget for one app and see exactly what it used?

GitHub does not currently support a separate Copilot budget for an individual GitHub App installation. Organization-level budgets apply, and an alert-only budget does not stop charges unless the stop-usage setting is enabled. To attribute app usage, export the AI usage CSV and inspect app_client_id; the standard usage view does not show that attribution. Owners can suspend or uninstall an app to revoke access.

Bottom line

GitHub Copilot SDK server-to-server authentication makes organization-owned background agents more practical, but the new GitHub App route is a public preview with one-hour installation tokens and organization-level billing. Use GITHUB_TOKEN for eligible GitHub Actions jobs; use a reviewed organization-installed GitHub App for external services. Monitor app-attributed usage and do not assume read-only permission or an alert-only budget prevents charges.

Explore related Make Better resources

Sources & useful resources