For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect to GitHub

Overview

Finout's GitHub integration ingests billing data across Actions, Copilot, Codespaces, Git LFS, Shared Storage, and Packages, so your GitHub spend appears alongside your other cloud and SaaS costs in MegaBill.

With this integration, you can:

  • See GitHub costs broken down by service (Actions, Copilot, Codespaces, etc.), SKU, organization, and repository, as well as service-specific fields like Copilot Model

  • See both the net billed cost and the list cost before discounts for each service

  • See usage quantity alongside cost, in each service's native unit (minutes, seats, AI credits, GB)

The token scopes this integration requires (manage_billing:enterprise and manage_billing:copilot) grant GitHub billing and Copilot management access at the enterprise level, since this is the minimal privilege required to report costs and usage.

Finout only ever reads billing and usage data with this token — it never modifies billing settings, Copilot seats, repositories, code, or any other GitHub resource.

Before you start

This integration supports GitHub Enterprise Cloud accounts only. Organizations on the GitHub Teams or Free plans aren't supported, since enterprise-level billing data isn't available on those plans.

Authentication uses a Classic Personal Access Token (PAT). Fine-grained tokens aren't supported, since GitHub doesn't expose billing data to fine-grained tokens.

You'll need:

  • A GitHub Enterprise Cloud account

  • Permission to assign the Enterprise Owner or Billing Manager role to a GitHub account

  • Admin access in Finout

Step 1: Create a dedicated service account in GitHub

  1. Create a new GitHub account using a shared email address (for example, finout-integration@yourcompany.com). This account doesn't need access to any repository or source code — only billing permissions.

  2. Assign the account one of the following roles on your GitHub Enterprise account:

Role
What it allows

Enterprise Owner

Full access to enterprise billing data across all organizations

Billing Manager

Read access to enterprise billing data — sufficient for this integration

To assign the role, go to github.com > your Enterprise > Settings > People > Invite member (or Manage roles for an existing account).

If you'd rather use a personal account, you can skip creating a service account — just make sure that account already holds the Enterprise Owner or Billing Manager role.

Step 2: Generate a Classic Personal Access Token

While logged in as the service account (or the personal account you're using):

  1. Click your profile picture (top right) > Settings.

  2. Scroll to the bottom of the left sidebar and click Developer settings.

  3. Click Personal access tokens > Tokens (classic).

  4. Click Generate new token > Generate new token (classic).

  5. Fill in the token fields:

Field
Value

Note (name)

Finout Billing Integration (or any descriptive name)

Expiration

1 year recommended — set a calendar reminder to rotate it before it expires

Scopes

manage_billing:enterprise and manage_billing:copilot — no other scopes are needed

  1. Click Generate token.

  2. Copy the token immediately — GitHub only shows it once.

manage_billing:enterprise grants access to GitHub billing costs (Actions, Copilot, Codespaces, and so on). manage_billing:copilot grants access to Copilot usage metrics. Both scopes must be on the same token.

Step 3: Find your GitHub Enterprise slug

The enterprise slug identifies which GitHub Enterprise account to connect.

  1. While logged in to GitHub, navigate to your Enterprise account.

  2. Copy the part of the URL after /enterprises/ — for example, in github.com/enterprises/acme-corp, the slug is acme-corp.

If you're not sure which URL to use, go to github.com, click your profile, then Your enterprises — the slug appears in the URL once you select your enterprise account.

Step 4: Connect GitHub to Finout

  1. In Finout, navigate to Settings > Cost Centers and click Add Cost Center.

  2. Find GitHub and click Connect Now. The Connect GitHub wizard opens.

  3. Enter the following details:

Field
Description

Cost Center Name

A name for this Cost Center in Finout. Defaults to GitHub.

Enterprise Slug

The slug you copied in Step 3.

Personal Access Token

The Classic PAT you generated in Step 2. Stored as a secret and never displayed again after saving.

  1. Click Next. Finout validates the credentials with a lightweight call to the billing API before saving.

If validation fails, Finout shows one of the following errors:

Error
Message to you

Invalid or wrong token

Authentication failed. Please check your token and try again.

Wrong enterprise slug or insufficient role

Enterprise Slug not found. Check your enterprise slug and ensure your token has Enterprise Owner or Billing Manager permissions.

Missing scopes on token

Your token is missing required permissions. Ensure it includes manage_billing:enterprise and manage_billing:copilot scopes.

Invalid slug format

Invalid enterprise slug format. Please check and re-enter.

If validation passes, the connection is saved and an initial data sync begins automatically.

What happens next

On first connection, Finout pulls the current month plus up to two previous full months of billing data, so you have historical context from day one. After that, GitHub costs refresh daily — each run fetches the last 7 days of data to capture any retroactive adjustments GitHub makes to prior days.

Editing your integration

You can update your Enterprise Slug or Personal Access Token at any time from Settings > Cost Centers. All fields are editable, and historical data is preserved when you update credentials. The token field shows as a secret — you'll need to re-enter the whole token to update it.

FAQs

Why doesn't Finout support GitHub Team or Free plans?

Enterprise-level billing data — the source this integration reads from — is only exposed by GitHub on Enterprise Cloud accounts. GitHub doesn't expose an equivalent billing API for Team or Free plans.

Does this integration give Finout access to my repositories or code?

No. The token scopes used (manage_billing:enterprise and manage_billing:copilot) grant enterprise billing and Copilot management access — per GitHub's own scope definitions, manage_billing:enterprise technically permits both reading and writing billing data, and manage_billing:copilot technically permits managing Copilot seats. Neither scope grants any access to repositories or code. Finout only uses this token to read billing and usage data — it never writes to your GitHub billing settings, Copilot seats, or any other resource.

Why is Repository Name empty for some line items?

GitHub only attributes a repository to certain charges (for example, Actions minutes). Org-level charges, such as Copilot seats, aren't tied to a single repository, so repositoryName is empty for those rows.

What happens if my Personal Access Token expires?

Once the token expires or is revoked, GitHub data stops refreshing. Generate a new Classic PAT with the same scopes and update it from Settings > Cost Centers — if any days were missed in the meantime reach out to Finout Support to backfill them.


Need help? If you run into any issues during setup, contact our support team at support@finout.io — we're happy to help.

Last updated

Was this helpful?