Migrate claim names
Move a consumer off the legacy scopes array and global user id claims, and know what changes about sub.
Canonical and legacy
Access tokens still carry some legacy claims beside the standard ones so that older consumers keep working. New code reads only the canonical claims.
- Read scope, a space-delimited string (RFC 9068), instead of scopes, a JSON array.
- Read sub instead of central_user_id and auth_user_id, and see the warning below: the meaning of sub changes.
- iss, aud, exp, iat, jti and client_id are standard and always present. type is access, refresh or id: check the purpose before you trust a token.
- In ID tokens amr follows RFC 8176 and lists the factors in the order they were used (otp, swk for a passkey, hwk for a passkey enrolled with a verified attestation, fed for federated, mfa when there were two or more) and acr is urn:bd:acr:otp, urn:bd:acr:passkey or urn:bd:acr:mfa; ask for phr (a user-verified passkey) or phrh (an attested one) in acr_values to have it claimed. Your tenant's custom claims sit under one namespaced key.
- app, token_version, permissions_version, session_id, email, is_system_admin and identity_class are first-party session state in access tokens. Do not build a new dependency on them.
The warning about sub
On the compatibility path sub is the global user id, the same value as central_user_id. Once a client is on the strict profile, sub is pairwise: different for the same person at each client, stable for that person at that client, and equal to no internal id. If your database joins on the global user id, migrate that join first, keyed on issuer, client and sub. Switching the client first would make every returning person look new.
Steps
Take the steps in this order.
- Find what you read: search for scopes, central_user_id and auth_user_id, and for anything that decodes tokens.
- Read both during the transition: accept scope first and fall back to scopes only while the client is on the compatibility profile. Never fall back the other way.
- Move the identity key: store the pairwise sub against your user, linking on the first sign-in after the change by a method you already trust, not the token alone.
- Ask the service operator to clear the adapters on the client. legacy_scopes_array re-emits scopes. legacy_global_id re-emits central_user_id and auth_user_id and uses the global id as sub. A client with neither mints the strict RFC 9068 profile. There is no customer API for this in this release. Every client carries both adapters until an operator clears them, including a client created today, so on a new client sub is the global user id until then and does not become pairwise on its own. Do the two moves separately.
- Optionally ask for the strict_id_token_claims adapter, so that email, phone_number and name appear in the ID token only when the email, phone or profile scope was granted (OpenID Connect Core 5.4).
- Optionally ask for the strict_access_token_claims adapter, so that access tokens carry no email, is_system_admin or identity_class. Move a consumer that reads email from the access token to the ID token or userinfo first.
- Verify with synthetic data: sign in, call an API, refresh and sign in again as a returning person, who must resolve to the same user.
Rollback
The operator can put an adapter back; tokens minted afterwards carry the legacy claims again. Do not keep the legacy fallback in your code longer than the transition: scopes and the global id claims will be removed once every consumer has moved, and this guide will say when.