# Non-namespaced custom claims in app\_metadata or user\_metadata

**URL:** <https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586>\
**Category:** Get Help\
**Tags:** deprecations\
**Created:** [February 2, 2023, 5:03pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586 "2023-02-02T17:03:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonas.pauthier](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonas.pauthier/32/42729_2.png) [@jonas.pauthier](https://community.auth0.com/u/jonas.pauthier)\
**Post date:** [February 2, 2023, 5:03pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586/1 "2023-02-02T17:03:54Z")

</div>

Hello,

I received the email from Auth0 regarding the upcoming change with the private custom claims for Actions/Rules/Hooks.

1. I checked on all my tenants with the provided log query and had no results on each.
2. I checked all rules/hooks/actions on each tenant and they are all already using namespaced custom claims on tokens.
3. Custom claims don’t appear to be larger than 100KB.

The only place where we’re not using namespaced claims is in `user.app_metadata` and `user.user_metadata`. Should we namespace the claims there as well or is it not needed?

Is there anything I’m missing?

Thank you for your help.

---

<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:** [February 2, 2023, 6:36pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586/3 "2023-02-02T18:36:36Z")

</div>

Hello @jonas.pauthier,

Thanks for reaching out to the Auth0 Community!

> [@jonas.pauthier](#):
>
> Should we namespace the claims there as well or is it not needed?

It depends on whether you want the `user.app_metadata` and `user.user_metadata` appended to your access token/ID token. If you do not intend to use the information after decoding the access token/ID token, then it will not be necessary to include them.

On the contrary, if you intend to use the user\_metadata or app\_metadata for some logic, I recommend appending the user\_metadata and app\_metadata as custom claims to your tokens.

In short, you will only need namespaced custom claims if you intend to append them to an access token or ID token.

I hope that helps clarifies your questions.

Please let me know if you have any additional questions. I’d be happy to help.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jonas.pauthier](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonas.pauthier/32/42729_2.png) [@jonas.pauthier](https://community.auth0.com/u/jonas.pauthier)\
**Post date:** [February 3, 2023, 1:31pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586/4 "2023-02-03T13:31:09Z")

</div>

Thank you @rueben.tiow for your answer.

I guess we only need the top level claim property to be namespaced. Something like this is fine, isn’t it?

```plaintext
// event.user.app_metadata is in the form
// { property1: "value1", property2: { property3: "value2" } }

api.accessToken.setCustomClaim("https://myDomain.com/metadata", event.user.app_metadata)

```

---

<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:** [February 3, 2023, 8:28pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586/5 "2023-02-03T20:28:18Z")

</div>

Hi @jonas.pauthier,

Thank you for your reply!

Yes, that should be fine 👏! That should append the entire app\_metadata object as a custom claim.

Please reach out again if you have any questions. I’d be happy to help!

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jonas.pauthier](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonas.pauthier/32/42729_2.png) [@jonas.pauthier](https://community.auth0.com/u/jonas.pauthier)\
**Post date:** [February 6, 2023, 2:24pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586/6 "2023-02-06T14:24:12Z")

</div>

Alright, thank you @rueben.tiow.

---

<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:** [February 20, 2023, 2:25pm UTC](https://community.auth0.com/t/non-namespaced-custom-claims-in-app-metadata-or-user-metadata/99586/7 "2023-02-20T14:25:11Z")

</div>

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