Meaning of ID Token "sub" Claim
Sep 10, 2025
Overview
In reference to ID Token Structure, this article addresses what an ID Token's Subject (sub) claim contains, its meaning, and the format(s) it can take.
Applies To
- ID Token
- sub Claim
Solution
The Subject (sub) claim is populated with the user’s user_id attribute. This attribute takes the form of [provider]|[local part]:
- The provider will indicate the strategy being used, such as:
auth0,google-oauth2,github, etc - The local part is flexible in the following ways:
- It can be explicitly set on account creation
- If not explicitly set during account creation, it will be a hexadecimal string (for example,
5c6b52fd451bd02197ecbd5f)