Dev & EngARTICLE

GitHub Apps Can Now Access Enterprise Billing Data via API

Enterprise owners can now grant billing permission to GitHub Apps, freeing cost automation from dependence on a single person's personal token.

The GitHub Changelog from August 26, 2026 announced a small change in wording, but one with a large practical effect for anyone administering infrastructure on enterprise accounts: GitHub Apps can now be granted permission to access enterprise billing data. When creating or configuring an App, the enterprise owner chooses the enterprise billing permission at one of two levels: read or read and write.

In practice, this means an installation access token carrying this permission can call the enterprise billing REST endpoints: pull usage data, reconcile invoices, and manage budgets and cost centers. All without a specific human needing to lend their token.

The Problem This Solves

Until now, the only way to read usage data or modify budgets and cost centers through the API was with a personal access token (PAT) belonging to an enterprise owner or billing manager. Anyone who has built a FinOps pipeline on top of GitHub knows the pain: the entire automation was tied to one person's token.

The result is the classic bus factor applied to billing. The person changes roles, leaves the company, or has their token revoked in a credential rotation, and the cost report that ran every night simply stops working. Worse: when the job fails silently, nobody notices until month-end close, when the reconciliation spreadsheet comes up empty.

Tying automation to a personal credential is a well-known anti-pattern in any stack, not something specific to GitHub. In cloud environments, the equivalent is running a pipeline with an employee's access key instead of a service account or an IAM role. The fix is always the same: move the automation's identity to an entity owned by the organization itself, one that survives any individual's departure. That's exactly what the billing permission on GitHub Apps delivers.

How It Works Under the Hood

The GitHub Apps authentication model was already the recommended path for institutional automation, and now it covers billing as well. The flow, broadly speaking:

  1. You create (or configure) a GitHub App on the enterprise and set the enterprise billing permission to read or read and write.
  2. The App is installed at the enterprise scope.
  3. Your automation authenticates as the App (via a JWT signed with the private key) and exchanges it for a short-lived installation access token.
  4. That token, carrying the billing permission, calls the enterprise billing REST endpoints.

The conceptual difference from a PAT is that the identity is now the App, an entity belonging to the organization, not a person. The installation token is ephemeral by nature, which reduces the risk surface of a leaked credential, and permissions are explicit and auditable on the App itself.

There's also an operational bonus the changelog is careful to mention: the installation token comes with higher rate limits than a PAT. For anyone scanning usage across a large enterprise with many orgs and cost centers, that higher ceiling is the difference between a job that runs cleanly and one that needs backoff and retry logic to avoid hitting the limit.

A Concrete Case in the CI/CD Flow

The most direct scenario: a scheduled job (GitHub Actions, a cron on some runner, or a serverless function) that runs every day, authenticates as the App, pulls Actions, Packages, Copilot, and storage consumption by cost center, and dumps it all into a data warehouse or a BI tool.

Because the enterprise owns the App, the job doesn't die when someone leaves. Invoice reconciliation automation, comparing what the API reports against what came in the invoice, becomes a versioned infrastructure artifact rather than a personal script living on someone's machine.

With the read and write level, you can go beyond reporting: adjusting budgets and cost centers programmatically. Think of automatically provisioning a new cost center when a new team is created, or applying a budget cap as part of a squad's onboarding, all within the same pipeline that already creates repositories and configures branch protection.

Trade-offs and When NOT to Use It

The change is clearly good, but it's neither free nor universal.

  • GitHub Enterprise Cloud only. The permission is available on that plan. Anyone on Enterprise Server or a regular organization plan still lacks this option. Before designing the automation, confirm the plan.
  • read and write is a sensitive permission. Granting billing write access to an App means whoever controls the App's private key can alter budgets and cost centers. Treat that key with the same rigor as a production secret: a secrets vault, rotation, and the minimum access possible. If the automation only generates reports, just use read and don't request write access for convenience.
  • Governance over who creates Apps. The power to grant this permission belongs to the enterprise owner. It's worth having a clear approval process, otherwise you trade the risk of a loose PAT for the risk of several poorly governed Apps with access to billing.
  • An App no longer makes sense for very short-lived tasks. If all you need is a one-off manual query, setting up an App is overhead. For a one-time exploration, a billing manager's PAT is still faster to use, as long as you accept its disposable nature.

The practical rule: recurring, institutional automation should live in an App; manual, ephemeral investigation can stay on the personal token.

What Remains Open

The changelog is terse and doesn't detail exact rate limit numbers, nor whether there is full parity between what the App can do and what an enterprise owner can do through the UI. It's worth checking the GitHub App permissions documentation and the billing REST API reference before assuming full endpoint coverage.

The move fits into a recent GitHub sequence of maturing the enterprise ecosystem through Apps, the August changelog itself also brought the ability for enterprises to install third-party Apps. The direction is consistent: taking critical automation out of individuals' hands and placing it into entities the organization can govern. For those doing FinOps on GitHub in Brazil, it's a missing piece.

Translated from the Brazilian Portuguese original · Read the original