Standard and custom claims
An ID tokenIn OpenID Connect, a signed JWT from the provider, addressed to one client, saying which account authenticated, when, and in answer to which request. It reports a sign-in and is not used to call APIs. says which account signed in, but an application usually wants to know more about the person: a name to greet, an address for receipts. This lesson reads the claims OpenID ConnectAn identity layer on top of OAuth 2.0 that lets an application sign people in with an account at another service. It adds the ID token, standard claims, and discovery to the OAuth exchange. defines for describing a person, weighs what each one is worth, and shows how a provider names claims of its own so they cannot collide.
Statements about a person
The collage app accepts sign-ins from two providers, the photo service and the mail service, and it treats a subject as meaningful only next to the issuerThe party that creates and signs a token, assertion, or certificate, named in a token's iss claim. A recipient must check that the issuer is exactly the one it expected and trusts. that assigned it. When Ava signs in with her photo account, the validated ID tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. gives it exactly that pair: user-2048 at https://auth.photos.example, authenticated at 08:59:45. All domains, identifiers, and values in these examples are fictional. The pair is enough to find Ava's collage account. It is not enough to greet her by name, to show her picture beside her saved collages, or to tell the collage app where to send a receipt when her printed collage ships.
For those, the collage app needs information about Ava as well as about the sign-in. OpenID Connect describes both kinds in the same way, as claims.
A claim is a name with a value, such as "given_name": "Ava". What is Identity? described a claim as a statement about someone that may or may not be true, and Trust across systems showed claims carrying a sign-in from an identity providerA service that authenticates users and tells other applications about the sign-in, so those applications never handle the users' passwords. In OpenID Connect it is called an OpenID Provider. to an application. The ID token is made of claims too, but they describe the token and the authenticationChecking evidence that someone, or some application, controls an account, such as a password or a passkey. It establishes which account is being used, not what that account may do. event: who issued it, for whom, when, and in answer to which request. The claims in this lesson describe the person.
Here is what the photo service can say about Ava's account:
{
"sub": "user-2048",
"name": "Ava Archer",
"given_name": "Ava",
"family_name": "Archer",
"picture": "https://photos.example/avatars/user-2048.jpg",
"locale": "en-US",
"email": "[email protected]",
"email_verified": true,
"updated_at": 1788220800
}Every value here is the photo service's statement, but it stands behind them in different ways. sub is its own identifier for Ava's account, and nobody knows better than the photo service which account that is. "Ava Archer" is whatever Ava typed when she created the account. The photo service has probably never checked it against anything. The picture is one she uploaded. email_verified says the photo service once confirmed, by its own process, that Ava controlled [email protected]. updated_at records when Ava last changed any of these details, 1 September 2026 at 00:00 UTC, written in seconds since 1970 like the times in the ID token.
Ava's claims
- sub
- user-2048
- name
- Ava Archer
- picture
- user-2048.jpg
- email_verified
- true
- updated_at
- 1788220800
What stands behind it
- sub
- Its own identifier for Ava's account
- name
- Whatever Ava typed
- picture
- One she uploaded
- email_verified
- Confirmed once, by its own process
- updated_at
- When Ava last changed any of these details
Only the issuer and subject are fit for deciding which collage account belongs to Ava.
So the collage app weighs each claim against what it will be used for, as What is Identity? described with claims and evidence. A name shown in a greeting needs no evidence at all. If it is wrong, the greeting is wrong. An email address that receives receipts should at least be verified. Deciding which collage account belongs to Ava is a different matter, and only the issuer and subject are fit for it. Claim stability and privacy returns to that distinction.
Apart from sub, none of these claims is in the ID token the collage app has already validated. Scopes and the claims parameter and The UserInfo endpoint show how the collage app asks for them and where it collects them.
The standard claims
OpenID Connect defines a small set of standard claims with fixed names, types, and meanings. Because every provider uses the same names, the collage app reads given_name in the same way from the photo service and from the mail service. That is the problem the /me endpoints in From delegated access to sign-in never solved, because each service chose its own field names.
| Claims | What they hold |
|---|---|
sub | The provider's identifier for the account, a case-sensitive string. |
name, given_name, family_name, middle_name | A full name for display, and its parts. A person can have several given or family names, separated by spaces, or no family name at all. |
nickname, preferred_username | A casual name, and the short name the person would like to be known by at the relying party. |
profile, picture, website | Addresses of a profile page, a profile photo, and a personal website or blog. picture must point at an image file, not at a page containing one. |
email, email_verified | The preferred email address, and a boolean saying whether the provider has verified it. |
phone_number, phone_number_verified | The preferred phone number, recommended in international format beginning with + and the country code, and a boolean saying whether the provider has verified it. |
address | A postal address as a JSON object, with parts such as street_address, locality, postal_code, and country, or a single formatted value. |
gender, birthdate | Gender, and a birth date written as YYYY-MM-DD. The year can be 0000 when the person shares only the day and month. |
zoneinfo, locale | A time zone name such as Europe/Paris, and a language tag such as en-US. |
updated_at | When the person's information last changed, as a number of seconds since 1970. |
A few of these are easy to misread. name is meant for display, with its parts in the order the person prefers, which is not always given name first. When the collage app wants a full name, it shows name rather than joining given_name and family_name itself.
preferred_username looks like an identifier and is not one. It is the short name Ava would like to be called at the collage app, such as ava.a. It may contain spaces, @ signs, and slashes, Ava can change it whenever she likes, and the specification says plainly that relying parties must not rely on it being unique. Another photo account could prefer ava.a tomorrow. The collage app can display it, but it never looks up an account with it.
Each claim also has a type. email_verified is a JSONA text format for structured information, written as named values inside curly braces. APIs, tokens, and discovery documents all use it. boolean rather than the text "true", updated_at is a number, and address is an object, so code that treats every claim as a string will misread some of them.
Claims written for people to read can also come in more than one language or script. OpenID Connect marks the language by adding a language tag to the claim name after a #. The photo service has customers in Japan, where a family name written in kanji is often stored together with its reading in katakana, so one of their accounts might return:
{
"sub": "user-5170",
"family_name": "山田",
"family_name#ja-Kana-JP": "ヤマダ",
"website": "https://yamada.example/",
"website#en": "https://yamada.example/en/"
}A value without a tag states no language. It is the provider's default version of the claim, and the collage app reads it that way. A relying partyAn application that accepts and relies on a sign-in from another service, the name used in OpenID Connect and for passkeys. SAML calls the same role a service provider. states its preferences with the claims_locales request parameter, a space-separated list of language tags in order of preference such as claims_locales=ja-Kana-JP ja, or names a tagged claim such as family_name#ja-Kana-JP in the claims parameter that Scopes and the claims parameter introduces. Either way it is a preference. The provider returns what it holds, may pick the closest language it has, and does not fail the request over a language it lacks. When a relying party asks for a single language, the provider is encouraged to send values in that language with no tag at all, so the collage app reads the untagged claim first and copes with tagged ones beside it. This is a different setting from ui_locales, which The authentication request mentioned: ui_locales chooses the language of the provider's pages, and claims_locales the language of the values it returns.
No provider holds every claim for every account. The photo service has no phone number or birth date for Ava, so no request will produce them. A provider can list the claims it may be able to supply in the claims_supported field of its discovery documentA JSON document that an OpenID Provider publishes at a well-known address under its issuer, listing its endpoints, where to find its signing keys, and its supported features so clients can configure themselves from one value.. That list describes the provider in general, not what it holds about any one person.
Custom claims
The standard set is deliberately small. A provider often knows other things a relying party could use, and it can send claims of its own alongside the standard ones.
Suppose the collage company and the photo service agree on a partnership: members of the photo service's paid plan get free shipping on printed collages. The collage app needs to know whether Ava is a member, and only the photo service can say. It defines a claim for the purpose:
"https://photos.example/claims/membership": "plus"The name looks like a web addressA web address, such as https://photos.example/api/albums/42?limit=10. It names how to connect (https), the domain, the path to a particular page or resource, and any extra parameters after the question mark., and that is deliberate. A name such as membership would be easier to read, but nothing stops the mail service from sending a membership claim of its own that means something else, such as a newsletter Ava joined, and the collage app reads claims from both providers. A future standard could define membership with yet another meaning. A collision-resistant name, built from a domain the photo service controls, cannot clash with anyone else's, because names under photos.example are the photo service's to define. OpenID Connect recommends names like this for claims outside the standard set. Short names agreed privately between two parties are also allowed, and they are common, but they hold up only while nobody else uses the same name for something different.
The name prevents collisions. It does not explain the claim. What "plus" means, which other values can appear, whether someone without a paid plan receives a different value or no claim at all, and how current the value is all come from the photo service's documentation and the agreement between the two companies, in the same way that the meaning of photos.read came from the service that defined it. The collage app needs those answers before it builds free shipping on the claim.
It also needs to know what the claim can prove. The photo service is the authority on its own memberships, so this claim is as reliable as the photo service itself, as of the moment it was issued. A membership can lapse the next morning. A custom claim that repeats something the photo service merely heard, such as a company name Ava typed into her profile, is no more reliable for having a name of its own. Sometimes the authority is another organization altogether, such as a university confirming that someone is a student. Claims that a provider passes on from such a source are called aggregated and distributed claims, and Advanced OIDC covers them, starting with Combining claims from multiple sources.
In organizations, custom claims carry much of the useful information. A company's identity provider might send its project portal a claim naming each employee's team, and the portal could use it to open the right projects first. The same rules apply: a name the company controls, a meaning the company documents, and a relying party that decides for itself what the value is allowed to affect.
Each provider decides how its custom claims are requested. Some tie them to a scope of their own. Others expect the relying party to name them individually, which Scopes and the claims parameter shows. When a claim arrives that the collage app does not recognize, it ignores it. That keeps the collage app working when a provider adds claims, and it keeps information the collage app never asked for out of its records.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Read your tenant's standard claims and add a custom membership claimCheck the standard claims Lab Photos issues and their JSON types, add a custom claim from directory data behind its own scope, give it a collision-resistant name, and keep only the claims you use.