# Add custom claim to access token

**URL:** <https://community.auth0.com/t/add-custom-claim-to-access-token/93222>\
**Category:** Get Help\
**Tags:** rules, login, auth0\
**Created:** [October 27, 2022, 2:03pm UTC](https://community.auth0.com/t/add-custom-claim-to-access-token/93222 "2022-10-27T14:03:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunraj.singh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/arunraj.singh/32/33630_2.png) [@arunraj.singh](https://community.auth0.com/u/arunraj.singh)\
**Post date:** [October 27, 2022, 2:03pm UTC](https://community.auth0.com/t/add-custom-claim-to-access-token/93222/1 "2022-10-27T14:03:00Z")

</div>

We use auth0 domain as namespace identifier in our custom claims as shown below-

- [https://abcdapp.auth0.com/user\_metadata](https://abcdapp.auth0.com/user_metadata)
- [https://abcdapp.auth0.com/app\_metadata](https://abcdapp.auth0.com/app_metadata)

As per below link, we need to remove auth0 from namespace.

> **[Custom Claims Migration](https://auth0.com/docs/troubleshoot/product-lifecycle/deprecations-and-migrations/custom-claims-migration#restriction-on-auth0-and-webtask-namespaces)**
>
> Describes migration from Legacy namespaced claims to custom claims.

Is it ok to change it as below? Or it has to be a valid namespace?

- [https://abcdapp.com/user\_metadata](https://abcdapp.com/user_metadata)
- [https://abcdapp.com/app\_metadata](https://abcdapp.com/app_metadata)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 27, 2022, 6:29pm UTC](https://community.auth0.com/t/add-custom-claim-to-access-token/93222/3 "2022-10-27T18:29:40Z")

</div>

Hey there @arunraj.singh welcome to the community!

> [@arunraj.singh](#):
>
> Is it ok to change it as below? Or it has to be a valid namespace?

That namespace should work! Keep in mind you can now also use non-namespaced custom claims:

[https://auth0.com/docs/troubleshoot/product-lifecycle/deprecations-and-migrations/custom-claims-migration#:~:text=As%20of%2028%20July%202022,read%20JSON%20Web%20Token%20Claims](https://auth0.com/docs/troubleshoot/product-lifecycle/deprecations-and-migrations/custom-claims-migration#:~:text=As%20of%2028%20July%202022,read%20JSON%20Web%20Token%20Claims)  
Hope this helps!

---

<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:** [November 10, 2022, 6:30pm UTC](https://community.auth0.com/t/add-custom-claim-to-access-token/93222/4 "2022-11-10T18:30:35Z")

</div>

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