Cost centers help you track and control GitHub costs by mapping them to your company's financial structure.
This tutorial guides you through planning, creating, and managing cost centers using both the user interface and the REST API, helping you decide which approach best fits your organization's needs.
As your enterprise grows, you can layer increasingly granular controls on top of cost centers to keep Copilot spending predictable:
- Group at scale. Assign whole enterprise teams to a cost center so membership stays current automatically as people join and leave.
- Cap per-user spending. Set a cost center user-level budget so every member of a cost center inherits the same per-person limit. See Budgets for usage-based billing.
1. Plan your cost center strategy
Cost centers allow you to group GitHub resources—users, enterprise teams, organizations, and repositories—for separate cost tracking and reporting. Each cost center should represent a segment of your company that you want to report on or control costs for as a separate entity.
If you use Azure billing, you can assign a different billing identity to each cost center.
Identify the cost centers you need
The best strategy depends on the complexity of both your financial reporting structure and your GitHub setup. Start with the simplest approach—you can always add more cost centers later.
Follow these steps to plan your cost centers:
-
Map to financial entities: Create one cost center for each financial entity you want to track internally (such as departments, business units, or project teams).
-
Identify users: List the users who belong to each financial entity. Assigning users directly to a cost center ensures their license and product usage is allocated correctly.
-
Identify enterprise teams: If you manage groups of users with enterprise teams, you can assign a whole team to a cost center instead of listing its members. Team membership flows into the cost center and stays current automatically.
-
Identify organizations: List the organizations that belong to each financial entity. Assigning organizations to a cost center allocates their usage of actions, Codespaces, packages, and other products correctly.
-
Identify mixed ownership: If an organization contains repositories owned by different financial entities, plan to assign individual repositories to the relevant cost centers and leave the organization unassigned.
Tip
If a user is directly assigned to cost center A, and indirectly part of cost center B by organization membership, all their costs for licensed products are allocated to cost center A. For more details and an example, see Cost center allocation for different products.