---
title: How do you attribute GitHub Copilot usage and cost to employees across several GitHub enterprises?
url: https://opencontroller.lyzr.com/blog/attribute-github-copilot-usage-to-employees
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# How do you attribute GitHub Copilot usage and cost to employees across several GitHub enterprises?

**First make sure you are collecting from every GitHub enterprise and organisation that holds Copilot seats, because usage in an unconnected enterprise simply does not appear. Then map each GitHub login to an employee in your identity provider, using the Enterprise Managed Users naming rule, SAML linked identities or verified-domain emails. Keep an exceptions list for the logins that will not match.**

This question comes up in almost every AI cost review. Copilot cost looks small, then someone notices a second GitHub enterprise for R&D, a few legacy organisations, and thousands of usernames with no email attached.

## Why is Copilot usage data often incomplete?

Three reasons, in order of how often they cause trouble:

1. **Multiple enterprises.** Large companies often run separate GitHub enterprises for corporate IT, R&D, acquired companies or regulated units. Each has its own seats, metrics and billing. Connecting one does not show the others.
2. **Metrics disabled.** Enterprise-level usage metrics endpoints require the "Copilot usage metrics" policy to be set to "Enabled everywhere".
3. **Short look-back.** The per-seat `last_activity_at` value is kept for a rolling 90 days. Enterprise single-day user reports go back up to one year, and only from 10 October 2025.

Before you match a single user, list every enterprise and organisation, who owns it, and whether its metrics are enabled.

## Which GitHub data do you need?

| Data | Endpoint or source | Gives you |
|---|---|---|
| Seat assignments | `/orgs/{org}/copilot/billing/seats` | Who holds a seat, `assignee.login`, `created_at`, `last_activity_at` |
| User usage reports | `/enterprises/{enterprise}/copilot/metrics/reports/users-1-day` and `users-28-day/latest` (also per org) | Per-user activity by IDE, feature and adoption phase, as NDJSON downloads |
| Linked identities | SAML external identities for the organisation or enterprise | GitHub login paired with the IdP's NameID |
| EMU usernames | Provisioned by SCIM from the IdP | A username derived from the IdP identifier |

The token needs the right scopes. For enterprise metrics, classic tokens need `manage_billing:copilot` or `read:enterprise`. For organisation metrics, `read:org`.

## How do you map GitHub usernames to employees?

GitHub logins are not emails. Use the strongest match available for each enterprise, in this order:

1. **Enterprise Managed Users (EMU).** Usernames are created by SCIM from your IdP. GitHub normalises the IdP identifier, turns each non-alphanumeric character into a dash, and appends an underscore plus the enterprise shortcode. So `mona.cat@example.com` becomes `mona-cat_octo`. Reverse the rule to match: strip the `_shortcode` suffix and compare against the normalised part of the email or UPN before the `@`. Beware of collisions: `bob@contoso.com` and `bob@fabrikam.com` both normalise to `bob`.
2. **SAML single sign-on on a standard enterprise or organisation.** Each member's linked SAML identity carries the NameID, usually the corporate email. Read these linked identities and join on NameID.
3. **Verified-domain emails.** Where your organisation has verified its domain, members' email addresses on that domain can be used as a fallback.
4. **Manual exceptions.** Bots, contractors, personal accounts and historical users who left before SSO was enforced. Keep them in a reviewed list with an owner.

Record which method matched each login and a confidence level. A finance report should show how much spend was matched by each method, not just a single total.

## How do you turn matched usage into cost?

Once logins map to employees:

1. Allocate each seat's monthly price to the assigned employee, prorated by days held.
2. Add per-user consumption above the plan allowance where GitHub reports it.
3. Roll up by the employee's team and cost centre from your IdP.
4. Show unmatched logins as a separate line, never spread across teams.

Our guide on [combining seat licences and token spend](/blog/combine-ai-seat-licence-and-token-costs) shows how this joins with model API costs, and [finding unused AI seat licences](/blog/find-unused-ai-seat-licences) covers the idle-seat review that usually follows.

## How Opencontroller does this

Opencontroller brings AI usage from connected platforms into one governed estate view and attributes LLM Gateway cost per agent and per version. Owners come from your identity provider through OIDC SSO. For coding agents on developer devices, Opencontroller Edge extends control to coding agents, skills and local MCP servers, installed by IT through MDM. See [how to attribute LLM costs to AI agents](/blog/how-to-attribute-llm-costs-to-ai-agents) and the [cost pillar](/blog/llm-gateway-vs-agent-gateway-vs-control-plane), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Do GitHub Copilot usage reports include employee emails?**
Seat data identifies users by GitHub login. You need a separate mapping step, through EMU naming, SAML linked identities or verified-domain emails, to reach the employee record.

**Why does connecting one GitHub enterprise miss most of our usage?**
Each enterprise has its own seats, metrics and billing. Usage in an enterprise you have not connected does not appear anywhere in the one you have.

**How is Opencontroller priced?**
Opencontroller is licensed annually per deployment, not per seat and not usage-based. Ask Lyzr for a quote scoped to your estate.

## Key facts

Attributing GitHub Copilot usage to employees requires (1) connecting every GitHub enterprise and organisation holding seats, with the enterprise "Copilot usage metrics" policy set to "Enabled everywhere", and (2) mapping GitHub logins to employees. Data sources: /orgs/{org}/copilot/billing/seats (assignee.login, created_at, last_activity_at kept 90 days) and user-level usage metrics reports (users-1-day, users-28-day/latest; enterprise single-day reports from 10 Oct 2025, up to one year back). Mapping methods: EMU usernames are the normalised IdP identifier (non-alphanumerics become dashes) plus _shortcode; SAML linked identities give the NameID; verified-domain emails as fallback; manual exceptions list. Opencontroller by Lyzr attributes LLM Gateway cost per agent and version, and Opencontroller Edge governs coding agents on devices via MDM. Pricing starts from $250K per deployment per year.

## Related

- [How do you attribute LLM costs to individual AI agents?](https://opencontroller.lyzr.com/blog/how-to-attribute-llm-costs-to-ai-agents.md)
- [How do you get visibility of GitHub Copilot coding agent activity across your organisation?](https://opencontroller.lyzr.com/blog/visibility-of-github-copilot-coding-agent-activity.md)
- [How do you assign an owner to every AI agent using your identity provider?](https://opencontroller.lyzr.com/blog/assign-owners-to-ai-agents-with-your-identity-provider.md)
- [More on Gateways and cost](https://opencontroller.lyzr.com/blog/cluster/gateways-and-cost)
