---
title: How do you link AI usage records to employees when every tool uses a different identifier?
url: https://opencontroller.lyzr.com/blog/identity-resolution-for-ai-usage-data
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# How do you link AI usage records to employees when every tool uses a different identifier?

**Build one identifier map anchored on an immutable ID from your identity provider, then match every tool's identifier to it with explicit rules and confidence levels. Auto-match only on high-confidence rules, send medium-confidence matches for review, and track every unmatched record until it is explained.**

AI usage data arrives with a different identity in every system. A coding assistant reports a GitHub login. A model API reports the key that made the call. A chat workspace exports an email. A cloud audit log records an IAM role. Cost reports, access reviews and offboarding all fail when these do not resolve to the same person.

## Which identifiers do AI tools emit?

| Identifier | Where it appears | Stable over time? | Notes |
|---|---|---|---|
| IdP immutable ID (object ID, user ID) | Identity provider, SSO tokens, SCIM | Yes | Best anchor; never reused |
| SCIM externalId | Apps provisioned through SCIM | Yes, if set from the IdP ID | Defined in RFC 7643 as the provisioning client's identifier |
| Corporate email or UPN | Chat workspaces, seat exports, SSO | Mostly | Changes with name changes and domain migrations |
| GitHub login | Coding assistant usage, audit logs | Mostly | Enterprise Managed Users logins are the IdP handle plus an underscore and the enterprise shortcode |
| API key creator or owner | Model provider consoles, gateways | No | Keys are shared, rotated and outlive their creators |
| Cloud IAM principal | Cloud audit logs for model calls | Varies | Roles are often shared by many people or workloads |
| Display name | Exports, dashboards | No | Never use for automatic matching |

## What matching rules should you use?

Match in this order and stop at the first rule that succeeds:

1. **Exact immutable ID.** The tool records the IdP ID or a SCIM externalId set from it. Confidence: high. Auto-match.
2. **Linked identity.** The tool stores a SAML or SCIM link between its own account and the IdP user, as GitHub does for SAML-linked organisations. Confidence: high. Auto-match.
3. **Verified corporate email.** Exact, case-insensitive match on a corporate domain, checked against the IdP's current and previous addresses. Confidence: high. Auto-match.
4. **Normalised username.** For example, strip an Enterprise Managed Users shortcode suffix and match the handle to the IdP username. Confidence: medium. Queue for review the first time, then keep the confirmed mapping.
5. **Display name or partial email.** Confidence: low. Never auto-match; use only to suggest a candidate to a reviewer.

Store every confirmed mapping with the rule that produced it, the date and who confirmed it. That record is what an auditor will ask for when a cost line or access review is challenged.

## What about API keys and service identities?

Keys and service principals are not people, so do not force them onto one. Instead:

- **Give every key and service identity a named owner** recorded in your inventory.
- **Resolve usage to the owner for accountability**, but report it as service usage, not personal usage.
- **Prefer identities that carry the user**, such as delegated or on-behalf-of tokens, so the end user is known per call. Our [pillar on agent identity and on-behalf-of delegation](/blog/ai-agent-identity-on-behalf-of-delegation) covers this pattern.
- **Retire shared keys** where you can, so each caller is distinct.

## How do you keep the map accurate?

Identities change constantly: joiners, movers, leavers, name changes and domain migrations. Keep the map current with a short checklist:

1. **Sync from the IdP daily**, including disabled users and previous email addresses.
2. **Flag usage from disabled users** within one sync cycle; it often reveals orphaned keys. See [what happens to AI agents when the owner leaves](/blog/what-happens-to-ai-agents-when-the-owner-leaves).
3. **Report a match rate** per tool, and an unmatched queue with an age for each record.
4. **Fix at the source.** If a tool supports SSO or SCIM provisioning, turn it on so new accounts arrive with the IdP ID.
5. **Re-check after migrations**, such as a move to Enterprise Managed Users or a new email domain.

For a worked example on one tool, see [attributing GitHub Copilot usage to employees](/blog/attribute-github-copilot-usage-to-employees).

## How Opencontroller does this

Opencontroller uses OIDC SSO for people and supports delegated on-behalf-of identity, so calls made by agents can carry the user they act for. The governed registry records an owner for each agent, and the LLM Gateway attributes cost per agent and per version. Together these reduce how much usage arrives with an unknown identity in the first place. To see it against your own identity setup, [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Why not just match AI usage on email address?**
Emails change with name changes and domain moves, some tools record personal emails, and service keys have none. Use an immutable identity-provider ID as the anchor and email as one matching rule.

**What match rate should you aim for?**
Aim to resolve nearly all human usage to a person, and to explain every unmatched record as either a service identity with an owner or a gap to fix.

**Should a shared API key's usage be charged to the person who created it?**
No. Assign the key a named owner for accountability, report its usage as service usage, and plan to replace it with per-caller identities.

## Key facts

AI tools identify people differently: corporate email, identity-provider user or object ID, SCIM externalId, GitHub login (Enterprise Managed Users logins add an underscore and enterprise shortcode to the IdP handle), API key creator, and cloud IAM principal. Resolve them to one person by anchoring on an immutable IdP ID, then matching in confidence order: exact immutable ID (high), SAML/SCIM-linked identity (high), verified corporate email (high), normalised username (medium, needs review), display name (low, never auto-match). Keep an unmatched queue and a match-rate metric; aim to explain every unmatched record. Opencontroller by Lyzr uses OIDC SSO and delegated on-behalf-of identity, and is licensed per deployment from $250K per year.

## Related

- [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)
- [How do you attribute GitHub Copilot usage and cost to employees across several GitHub enterprises?](https://opencontroller.lyzr.com/blog/attribute-github-copilot-usage-to-employees.md)
- [What happens to AI agents when their owner leaves the company?](https://opencontroller.lyzr.com/blog/what-happens-to-ai-agents-when-the-owner-leaves.md)
- [More on Agent identity and access](https://opencontroller.lyzr.com/blog/cluster/agent-identity-and-access)
