When an application keys a person on their email address or username, a name change breaks their access and a recycled address hands their data and entitlements to someone else. Identifier design is one of the few identity decisions that is hard to undo: once downstream systems, logs and federation partners store a value, changing it means migration. This guide sets out the identifier types an organisation needs, the job each one does, how to keep internal IDs immutable and never reused, how to treat usernames and email, how to handle name changes and rehires, and where federation subject identifiers such as the OpenID Connect sub claim and the Microsoft Entra immutableId fit. It is written for IAM architects and directory engineers designing or cleaning up a workforce identity estate.
Key takeaways
- Separate the key from the label. Every person needs one immutable, meaningless internal identifier for systems to key on, and separate human-readable values (username, email, display name) that are allowed to change.
- Never reassign an identifier to a different person. NIST SP 800-53 Rev. 5 IA-4 requires preventing reuse of identifiers for a defined period; for internal keys the right period is forever.
- Email and usernames are attributes, not keys. OpenID Connect Core 1.0 says claims such as email and preferred_username must not be used as unique identifiers; Microsoft's ID token reference says the same for its email and preferred_username claims.
- Federated identifiers are issuer plus subject. A
subvalue means nothing without the issuer that assigned it, and NIST SP 800-63C-4 says relying parties must never process a subject identifier without accounting for the issuing IdP. - Identifiers are personal data. Pseudonymous, pairwise identifiers limit correlation across applications, but they remain personal data where they can be linked back to the person.
Identifier types and their jobs
Assign each job to a value designed for it.
| Identifier | Example | Job | Mutable? | Reusable? | Use as a key? |
|---|---|---|---|---|---|
| Internal person ID | Random GUID minted by the identity platform at first record | The join key across directory, IGA, HR feed and applications | Never | Never | Yes |
| HR worker or employee ID | Number issued by the HR system | Matching HR records to accounts; source-of-truth lookups | Rarely, by HR process | Policy-dependent; agree with HR | For HR matching only |
| Directory object ID | Active Directory objectGUID, Entra object ID | Stable reference inside one directory or tenant | No | No | Inside that directory |
| Sync source anchor | Entra Connect sourceAnchor (immutableId), often ms-DS-ConsistencyGuid | Links an on-premises object to its cloud object | Must not change after export | No | For synchronisation |
| Username or sAMAccountName | jsmith4 | Human sign-in label, legacy system logins | Yes, on request or name change | Avoid; quarantine if ever allowed | No |
| UPN or sign-in email | jane.smith (email-format sign-in name) | Sign-in name, routing | Yes | Avoid; quarantine if ever allowed | No |
| Federated subject identifier | OIDC iss + sub, SAML persistent NameID | Identity of the user at a relying party | No (per issuer) | OIDC: never reassigned | Yes, always with the issuer |
| Provisioning identifiers | SCIM id and externalId | Resource reference at the service provider and the client's own reference | id: never; externalId: client-managed | id: never | For provisioning |
The HR-to-directory matching key and pre-hire handling are covered in depth in the Identity Lifecycle Event Design Guide; this page focuses on the identifiers themselves and what consumes them.
Immutable internal IDs
NIST SP 800-53 Rev. 5 control IA-4 (Identifier Management) asks organisations to receive authorisation before assigning an identifier, select an identifier that identifies the individual, assign it to the intended individual, and prevent reuse of identifiers for an organisation-defined period. Its guidance explains that preventing reuse means not assigning previously used identifiers to different individuals. NIST SP 800-171 Rev. 3 carries the same requirement as 03.05.05.
- Meaningless: generate a random value (a GUID or UUID) rather than encoding name, department, start date or location.
- Minted once, by one system: pick the issuing authority (usually the identity platform or IGA tool at first record creation) and never let downstream systems mint their own person keys.
- Retained forever: keep a tombstone record of every ID ever issued, even after the account is deleted, so the generator can never produce or accept it again and audit logs remain attributable.
- Carried everywhere: write it to an indexed directory attribute (for example employeeId or a dedicated extension attribute) and to the SCIM
externalIdsent to applications. - Stable across moves: Microsoft's Entra Connect design guidance recommends objectGUID as the source anchor in a single forest, but advises a value that moves with the user, such as a synthetic GUID-like attribute stamped at creation or ms-DS-ConsistencyGuid, where users move between forests or domains. The anchor must be globally unique, must not be based on the user's name, and the wizard rejects userPrincipalName, mail and targetAddress. If it changes after export, synchronisation errors and blocks changes to the object.
RFC 7643 builds the same principle into SCIM: the service provider's id must be a stable, non-reassignable identifier that does not change and must not be specified by the client, while externalId is defined by the provisioning client, scoped to the provisioning domain, and its uniqueness is the client's responsibility. Send your internal person ID as externalId and store the provider's id in return. See the SCIM Provisioning Guide.
Usernames and display names
Usernames are labels people type and recognise. Treat them as mutable, unique-at-a-time values.
- Uniqueness is required, permanence is not: RFC 7643 requires the SCIM
userNameto be unique across the service provider's users and case insensitive. Enforce case-insensitive uniqueness in your own generator too, soJSmithandjsmithcannot coexist. - Character set and collisions: restrict to a safe subset (lower-case ASCII letters, digits and a separator), check new values against every username ever issued, not only active ones, and store the person's preferred name with full Unicode in a display attribute.
- Display names are for display: Microsoft's ID token reference notes that the name claim is not guaranteed to be unique and can change. Never use it in an access rule.
Email as identifier
Email is unique at any moment and familiar, but it still fails as a key.
- The standards say no: OpenID Connect Core 1.0 section 5.7 states that
subandissare the only claims a relying party can rely on as a stable identifier, and that claims such asemail,phone_number,preferred_usernameandnamemust not be used as unique identifiers. - Vendor platforms agree: the Microsoft identity platform ID token reference says the email claim is mutable and should never be used for authorisation or to save data for a user, that preferred_username is mutable and cannot be used for authorisation decisions, and that email, phone and UPN can change and can be reused over time.
- Federation guidance agrees: NIST SP 800-63C-4 says federated identifiers should not contain plaintext personal information such as usernames, email addresses or employee numbers at FAL1, and must not at FAL2 and above.
- Domains change hands: mergers, rebrands and expired domains mean the same address can later belong to someone else, inside or outside the organisation.
What to use instead: in Microsoft Entra ID, key per-user data on oid (immutable, a GUID that cannot be reused, the same across applications in one tenant) together with tid, or on the pairwise sub for a single application. In other OIDC providers, key on iss plus sub. Keep email as a contact and display attribute that you update on every sign-in.
Federation subject identifiers
| Identifier | Defined by | Key properties from the specification | Design note |
|---|---|---|---|
OIDC sub | OpenID Connect Core 1.0 | Locally unique and never reassigned within the issuer; case-sensitive; at most 255 ASCII characters | Store with iss; never compare across issuers |
OIDC pairwise sub | OpenID Connect Core 1.0 section 8 | A different value for each client, so clients cannot correlate the user without permission | Use for third-party relying parties; sector identifiers group related clients |
Entra oid | Microsoft identity platform | Immutable GUID, not reusable; differs per tenant for the same person | Do not correlate guests across tenants on it |
| SAML persistent NameID | OASIS SAML 2.0 Core section 8.3.7 | Opaque, built from pseudo-random values with no discernible link to the subject's actual identifier, at most 256 characters, specific to an IdP and SP pair | Prefer over an email-format NameID |
| Pairwise pseudonymous identifier (PPI) | NIST SP 800-63C-4 section 3.4.1 | Different identifier per RP; contains no identifying information; unguessable | Shared PPIs need a trust agreement designation and consent |
NIST SP 800-63-4 was published as final in July 2025 and supersedes SP 800-63-3. Its federation volume also says that, when an RP account has more than one federated identifier, linking a new one should require authentication with an existing identifier first, and that removing an identifier must block access through it. See the NIST SP 800-63 Digital Identity Guidelines Guide.
Reuse and recycling risks
Reuse is silent: the new holder signs in normally and inherits whatever was keyed to the value.
| Reused value | What the new holder can inherit | Control |
|---|---|---|
| Internal person ID | Entitlements, audit history, data ownership | Never reuse; tombstone every issued ID |
| Username | Application accounts keyed on login name, file ACLs in systems that store names rather than SIDs, stale group membership in downstream apps | Never reissue, or quarantine for a long, documented period with a downstream clean-up check before release |
| Email address | Password reset flows, SaaS accounts created with that address, shared links and invitations, mailing list and approval routes | Do not reissue; if a vanity address must move, remove it from every SaaS account first |
| Federated identifier keyed on email at the RP | The previous person's account and data at the application | Key RP accounts on issuer plus sub or oid |
| Phone number used for recovery | Account recovery codes | Re-verify recovery factors on lifecycle events |
Policy choice: IA-4 lets the organisation define the no-reuse period. For internal keys and federated identifiers, set it to permanent. For usernames and email, a permanent ban is simplest in large organisations; small organisations with a narrow naming space sometimes allow reuse after a quarantine, in which case document the period, require a search of every downstream system for the old value before release, and record the decision.
Name changes and rehires
Name changes
- HR changes the legal or preferred name in the source of truth; nothing else changes the person key.
- The identity platform updates display name, and, if policy allows, username and email, keeping the old email as an alias for a defined period so mail still arrives.
- Applications keyed on the internal ID,
oidorsubneed no action; they receive updated attributes on the next sync or sign-in. Applications keyed on email or UPN break here, which is the quickest way to find them. - Retire the old values permanently: add the old username and email to the never-reissue list.
- Privacy: a name change can be sensitive (for example after marriage, divorce or gender transition). Limit who can see name history, avoid exposing the previous name in display fields or email aliases visible to others, and follow the person's preference on alias retention where policy allows.
Rehires and returners
- Same person, same internal ID: match the returner to their tombstoned internal ID (through the HR worker ID or a verified identity match), so audit history stays attributable to one identity.
- Same ID, fresh access: entitlements should have been removed at leaving; on return grant birthright access only and request the rest. Re-enabling an old account with its old groups is a classic source of excess privilege.
- Conflicting HR IDs: if HR issues a new worker ID on rehire, store the link between old and new so the identity platform does not create a duplicate person.
- Contractor to employee: decide whether a conversion keeps the internal ID (one person, one ID) or creates a new persona; either is defensible, but record it. See the Contractor Identity Lifecycle Guide.
Privacy considerations
The UK Information Commissioner's Office lists identification numbers and online identifiers among the identifiers that can make information personal data, and says pseudonymised data remains personal data where it can be linked back to an individual. Design accordingly:
- Minimise what each application receives: send a pairwise or pseudonymous identifier where the application does not need to correlate with others, as NIST SP 800-63-4 and OpenID Connect both describe.
- Keep personal data out of keys: a random internal ID can appear in logs and URLs with less exposure than an email or employee number.
- Do not treat hashing as anonymisation: a hashed email is still linkable. See Hashed Emails and Identifiers.
Implementation approach
- Inventory consumers: list every application and integration and the attribute it keys users on (email, UPN, username,
oid,sub, employee ID). - Choose and mint the internal ID: select the issuing system, the attribute that carries it, and back-fill every existing account. Resolve duplicates before the back-fill.
- Build the never-reissue register: load every username, email and ID ever issued, including from archived directories, and make the generators check it.
- Pilot a name change: run a test identity through a full name change and watch which applications break; each one is a remediation item.
- Migrate applications in rings: move each application's key to the stable identifier, starting with those holding sensitive data. Keep the old key as a secondary lookup during transition, and roll back by reverting the mapping if sign-in failures rise.
- Lock it in: add the identifier standard to application onboarding so new integrations key on the stable ID from day one.
Measuring it
- Share of applications keyed on an immutable identifier rather than email, UPN or username.
- Number of duplicate person records found per quarter.
- Number of identifiers reissued to a different person (target: zero).
- Name changes that caused an access incident or support ticket.
- Rehires whose previous entitlements reappeared on return.
Common failure patterns
- Email as the SaaS key: an application creates accounts by email, the person leaves, the address is later given to a new starter with the same name, and the new starter signs in to the old account and its data.
- Name-derived anchors: a directory or sync anchor built from the name breaks when the name changes, producing a second cloud object and orphaned licences and permissions.
- Cross-issuer matching on
sub: an application storessubwithoutissafter adding a second identity provider, so two different people can collide. - Account linking by email: a relying party automatically links a new federated identity to an existing account because the email matches, without requiring sign-in with the existing identifier.
- Resurrected rehire access: the old account is re-enabled with every group it held years earlier.
- Machine accounts named after people: service accounts created under a person's username or email outlive the person and become orphaned. Give non-human identities their own identifiers and owners; see How to assign owners to orphaned service accounts.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | IA-4 Identifier Management | Authorised assignment and prevention of identifier reuse |
| NIST SP 800-53 Rev. 5 | AC-2 Account Management | Account lifecycle that consumes the identifiers |
| NIST SP 800-171 Rev. 3 | 03.05.05 Identifier Management | Same reuse requirement for systems handling CUI |
| NIST CSF 2.0 | PR.AA-01 | Identities and credentials for authorised users, services and hardware are managed |
| NIST SP 800-63-4 and 800-63C-4 | Federated identifiers, PPIs, account linking | Issuer plus subject, no plaintext personal data in identifiers at FAL2 and above |
| ISO/IEC 27001:2022 | Annex A 5.16 Identity management | Full lifecycle management of identities |
Practitioner checklist
- Mint one random, meaningless internal person ID per person, from one issuing system, and back-fill every account.
- Keep a permanent register of every internal ID, username and email ever issued, and check it before issuing any new value.
- Key applications on the internal ID, Entra
oidwithtid, or OIDCissplussub, never on email, UPN or display name. - Send the internal ID as SCIM
externalIdand store the provider'sid. - Choose a sync source anchor that never changes and moves with the user between forests.
- Prefer pairwise or pseudonymous identifiers for third-party relying parties.
- Require authentication with an existing identifier before linking a new federated identity.
- Test a full name change and a rehire end to end before go-live and after major integration changes.
- Give service accounts and other non-human identities their own identifiers and named owners.
Standards and references
- OpenID Foundation: OpenID Connect Core 1.0
- NIST: SP 800-63-4, Digital Identity Guidelines
- NIST: SP 800-63C-4, Federation and Assertions
- IETF: RFC 7643, System for Cross-domain Identity Management: Core Schema
- OASIS: Assertions and Protocols for the OASIS Security Assertion Markup Language (SAML) V2.0
- Microsoft Learn: ID token claims reference
- Microsoft Learn: Microsoft Entra Connect design concepts
- ICO: What is personal data?
Related NHI Mgmt Group resources: Identity Lifecycle Event Design Guide · Joiner-Mover-Leaver Guide · SCIM Provisioning Guide · Federation and Trust Relationships Guide