← All posts

FinOpsAid blog

Which cost center is this developer in? GitHub now answers in one call.

Every month-end close hits the same question: "Whose budget is this person's AI spend landing in?" Until now, answering it for one developer meant listing every cost center in the enterprise and searching each one's members.

Two November changes make that one call, and let a GitHub App act on the answer. They're small, plumbing-level releases. They also remove the most common excuse for chargeback drift, which is that checking assignments by hand is too slow to do every month.

The lookup GitHub didn't have

On November 3, GitHub shipped an endpoint that returns the cost center a resource belongs to (GitHub Changelog, November 2026):

GET /enterprises/{enterprise}/settings/billing/cost-centers/memberships?resource_type=user&name=monalisa

resource_type is user, repository, organization or team. For teams, that's an enterprise team slug. Repositories use owner/repo. The response carries a memberships array with each cost center's ID and name. An empty array means the resource isn't in any cost center, and that's the most useful answer it gives.

Access follows the billing role. Enterprise owners, billing managers and GitHub Apps with read access to enterprise billing can look up anything in the enterprise. Organization owners and custom roles with billing read access only see resources and cost centers that are already visible to them (GitHub Docs).

Why an empty answer matters

Cost centers are where GitHub pools and attributes AI credits natively, as our cost centers post explains. A developer who isn't in one still consumes credits. Those credits just don't land in any team's number. At month-end they turn up as an unallocated remainder, and someone has to argue about whose it is.

The usual cause is boring: a new hire, a transfer, or a contractor added by hand. The new endpoint lets you catch it at the point of change instead of at close. When someone's added to the enterprise, look them up. If memberships comes back empty, assign them, or flag it to the person who owns the mapping.

An onboarding check that keeps AI credit attribution complete A four-step flow. Step one: a developer joins the enterprise. Step two: a GitHub App with read access to enterprise billing calls the cost center membership endpoint for that user. Step three: if the memberships array is empty, the user's AI credits would be unallocated, so the user is assigned to a cost center or flagged for review. Step four, which is optional and needs the separate write permission Enterprise Copilot license management, is assigning a Copilot seat. The first three steps need only read access to billing. The fourth step can add or remove seats and should be held by a different, narrowly scoped app. ONBOARDING CHECK · READ FIRST, WRITE SEPARATELY 1 Developer joins hire, transfer, contractor 2 Look up membership GET …/memberships 3 Empty? Assign or flag else credits go unallocated 4 · optional Assign Copilot seat needs write permission READ ACCESS TO ENTERPRISE BILLING ENTERPRISE COPILOT LICENSE MGMT Steps 2 and 3 can't change anything. Step 4 can add and remove paid seats. Keep them in different apps, so a bug in the check can't touch a seat.
Most of the value is read-only. Endpoint and permissions from GitHub's November 3 and November 10, 2026 changelogs. The four-step flow is our suggested pattern, not a GitHub feature.

GitHub Apps can now manage enterprise Copilot seats

On November 10, GitHub let Apps call the enterprise-level Copilot seat management APIs, controlling which users and enterprise teams get a seat (GitHub Changelog, November 2026). It's a new fine-grained enterprise App permission called Enterprise Copilot license management.

The practical win is ownership. Seat automation used to mean a personal access token belonging to an enterprise admin. When that admin left, the token went with them, and so did the job that removed seats from leavers. An App installation isn't tied to a person, its permission is scoped to Copilot licensing, and its actions are logged as the App.

The cost lever is reclaiming idle seats on a schedule instead of once a quarter. Our guide to finding and reclaiming idle Copilot seats covers how to choose which seats. This permission is what lets that decision run without someone clicking through the UI.

Treat seat removal like a production change

A permission that can remove seats can remove the wrong ones. Two failure modes come straight from GitHub's own metrics. A developer whose editor sends no telemetry can look idle by lines of code while being active. Our November usage metrics post covers the new client_telemetry_present flag that catches that. And activity reports lag a couple of days, so "no activity this week" can just mean "not reported yet".

So build the removal job with a dry run that posts its list for a human to approve. Check telemetry presence before treating anyone as idle. Hold this permission in a separate App from anything that reads billing. If a reporting bot is compromised, it shouldn't be able to strip seats.

Our finding: FinOpsAid already snapshots every cost center and its assigned resources daily, so membership drift shows up in our history. For a full daily snapshot, listing still beats one lookup per user. The new endpoint is for point checks in an onboarding flow, which is where unallocated credits start. On the write side, our GitHub Apps request read-only access by design, and we won't ask for Enterprise Copilot license management. We'll tell you which seats look idle. Removing them stays your call, and your App's.

What to set up this month

  1. Add a cost center lookup to onboarding. An empty memberships array should open a ticket, not wait for month-end.
  2. Sweep existing users once. Look up everyone with Copilot activity and fix the empty ones before the next close.
  3. Retire seat-management PATs. Move the job to a GitHub App with only Enterprise Copilot license management.
  4. Put a human gate on removal. Dry run first, and exclude users with missing client telemetry.
  5. Keep read and write in separate Apps. Billing read access and seat write access shouldn't share a key.

Where FinOpsAid fits

FinOpsAid reads your enterprise read-only and attributes AI credits by cost center from GitHub's own billing data, with everything else on the bill allocated by our model and labelled that way. The Cost Explorer shows billed spend per cost center, with a separate row for spend not tagged to any cost center, and the licenses page shows which seats look idle. Related: chargeback by team, dormant seats as a security problem, and how to read the licenses page.

Frequently asked questions

How do I find which GitHub cost center a user belongs to?

Call GET /enterprises/{enterprise}/settings/billing/cost-centers/memberships with resource_type=user and name set to their login. It works for users, repositories (owner/repo), organizations and enterprise teams. The response lists each cost center's ID and name. An empty memberships array means the resource isn't in any cost center.

Can a GitHub App assign Copilot seats at the enterprise level?

Yes, since November 10, 2026. A GitHub App with the fine-grained enterprise permission Enterprise Copilot license management can call the enterprise Copilot seat management APIs to control which users and enterprise teams get Copilot seats. Before that, enterprise seat automation needed a personal access token from an admin.

Who can use the cost center membership endpoint?

Enterprise owners, billing managers and GitHub Apps with read access to enterprise billing can look up any resource in the enterprise. Organization owners and custom roles with billing read access can only look up resources and cost centers they can already see.

Sources

Want to know whose budget every AI credit lands in before month-end? Connect your GitHub org — read-only and free during beta — or explore the demo dashboard first.

chargebackcost-attributioncopilotgovernancefinops

See it in your own org

FinOpsAid meters the GitHub spend no invoice itemizes — read-only, and free during beta.