# Add standard OpenID Connect claims to id token

**URL:** <https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [July 13, 2024, 12:47pm UTC](https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799 "2024-07-13T12:47:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jochen.walz](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jochen.walz](https://community.auth0.com/u/jochen.walz)\
**Post date:** [July 13, 2024, 12:47pm UTC](https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799/1 "2024-07-13T12:47:37Z")

</div>

I’m new to this forum and we just started using Auth0 - so I just may not have digged deep enough to find the right way to reach following:

We need some of the claims from the OIDC standard profile for our application (e.g., zoneinfo and locale). The documentation ([OpenID Connect Scopes](https://auth0.com/docs/get-started/apis/scopes/openid-connect-scopes)) tells that these are returned in an id token. However, I haven’t found a place where these properties can be administrated for a user in the Auth0 user management.

Then, I tried to add “locale” : “en-US” to the user\_metadata of a user. Still, the id\_token in the token response did not contain the locale. The only way I could reach that was to add a post-login action to the login flow and explicitly add the “locale”, “zoneinfo” … claims to the id token:

```auto
api.idToken.setCustomClaim(`zoneinfo`, event.user.user_metadata.zoneinfo);

```

Is this really the correct way in Auth0 to deliver standard OIDC claims to id tokens? Please note that this is not about custom claims which do not appear in the standard OIDC scopes.

By the way: unfortunately, I could not select the oidc and id\_token tags for creating this topic.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 16, 2024, 9:20pm UTC](https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799/3 "2024-07-16T21:20:44Z")

</div>

Hi @jochen.walz,

Welcome to the Auth0 Community!

Yes, that’s correct! 👏

Using a post-login action is the correct way to append custom claims to an ID or access token.

Let me also clarify that the `profile` scope, while it should contain the `zoneinfo` and `locale` claims, in [this documentation](https://auth0.com/docs/get-started/apis/scopes/openid-connect-scopes#standard-claims), it states that `profile` will only return the `name`, `family_name` , `given_name` , `middle_name` , `nickname` , `picture` , and `updated_at` claims.

See screenshot below:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/a/dafe3cc0257ed5f70a056ca78ef27986e0506a4a.png)

This means that you must use a post-login action script to append the `zoneinfo` and `locale` as custom claims to your ID token.

Let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jochen.walz](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jochen.walz](https://community.auth0.com/u/jochen.walz)\
**Post date:** [July 17, 2024, 4:22am UTC](https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799/4 "2024-07-17T04:22:29Z")

</div>

Thanks for the clarification!

I had misunderstood the documentation - thought that “including” means that these are just examples, and apart from these, the full profile scope as defined in [Final: OpenID Connect Core 1.0 incorporating errata set 2](https://openid.net/specs/openid-connect-core-1_0.html) (see 5.4) is supported out-of-the-box. Good to have the confirmation that I found the correct solution 🙂 .

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 17, 2024, 10:56pm UTC](https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799/5 "2024-07-17T22:56:52Z")

</div>

Hi @jochen.walz,

That sounds good!

Feel free to reach out to us again if you have any questions.

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 31, 2024, 10:57pm UTC](https://community.auth0.com/t/add-standard-openid-connect-claims-to-id-token/138799/6 "2024-07-31T22:57:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
