# Custom claim not showing in JWT access token

**URL:** <https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751>\
**Category:** Get Help\
**Tags:** grants, management-api\
**Created:** [June 9, 2025, 5:11am UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751 "2025-06-09T05:11:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![matteo1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matteo1/32/71118_2.png) [@matteo1](https://community.auth0.com/u/matteo1)\
**Post date:** [June 9, 2025, 5:11am UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751/1 "2025-06-09T05:11:49Z")

</div>

I have a post login action that adds a custom claim to my JWT access token as suggested in the create custom claim docs.

This is my postlogin action:  
exports.onExecutePostLogin = async (event, api) =\> {  
api.accessToken.setCustomClaim(‘testclaim’, ‘authenticated’);  
api.idToken.setCustomClaim(‘testclaim’, ‘authenticated’);  
};

The custom claim is correctly added to the idtoken but not the accesstoken.  
I also tested this via the API debugger extension and the claim is still not showing up.

Please help I have been blocked on this for days!

---

<div class="post-metadata">

**Author:** ![matteo1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matteo1/32/71118_2.png) [@matteo1](https://community.auth0.com/u/matteo1)\
**Post date:** [June 9, 2025, 5:13am UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751/2 "2025-06-09T05:13:10Z")

</div>

I can confirm the token I am getting is not opaque, the API debugger and jwt. io show the claims.

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [June 10, 2025, 5:59pm UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751/4 "2025-06-10T17:59:20Z")

</div>

Hi @matteo1

Welcome to the Auth0 Community!

If you try debugging the access token received through [jtw.io](http://jtw.io) do you have the same result? Do you mind posting the debugged token in order to take a look?

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![matteo1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matteo1/32/71118_2.png) [@matteo1](https://community.auth0.com/u/matteo1)\
**Post date:** [June 11, 2025, 3:12am UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751/5 "2025-06-11T03:12:21Z")

</div>

Hi Nik, thanks for following up.

I actually figure out the issue, somewhere in your docs it mentions that scopes that contain the auth0 url do not allow adding custom claims to the access token. After setting up a separate API I was able to mint the token with the correct claims.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [June 11, 2025, 2:38pm UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751/6 "2025-06-11T14:38:47Z")

</div>

Thank you for letting us know! Glad to help!

If you have any other questions, you can always post on the community!

Kind Regards,  
Nik

---

<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:** [June 25, 2025, 2:39pm UTC](https://community.auth0.com/t/custom-claim-not-showing-in-jwt-access-token/187751/7 "2025-06-25T14:39:03Z")

</div>

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