# Getting user' roles claim in ID\_Token as just roles, not namespaces/roles

**URL:** <https://community.auth0.com/t/getting-user-roles-claim-in-id-token-as-just-roles-not-namespaces-roles/193670>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [October 27, 2025, 8:21am UTC](https://community.auth0.com/t/getting-user-roles-claim-in-id-token-as-just-roles-not-namespaces-roles/193670 "2025-10-27T08:21:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.zolotarev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael.zolotarev/32/71179_2.png) [@michael.zolotarev](https://community.auth0.com/u/michael.zolotarev)\
**Post date:** [October 27, 2025, 8:21am UTC](https://community.auth0.com/t/getting-user-roles-claim-in-id-token-as-just-roles-not-namespaces-roles/193670/1 "2025-10-27T08:21:40Z")

</div>

Spent a lot of time reading helps, samples and other posts on similar topics in this forum. Can get namespace/roles as custom claims allright, but trying to see if can get same info without namespaces.

Feels like I’m missing something fundamental.

Help appreciated.

Michael

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [October 31, 2025, 5:01pm UTC](https://community.auth0.com/t/getting-user-roles-claim-in-id-token-as-just-roles-not-namespaces-roles/193670/3 "2025-10-31T17:01:39Z")

</div>

Hi @michael.zolotarev

Welcome to the Auth0 Community!

Thank you for posting your question. With OIDC-conformant tokens, Auth0 doesn’t allow a plain `roles` claim in the ID Token. If you include roles, they must be added as a custom, namespaced claim.

You can read more about restrictions here →

> **[Create Custom Claims](https://auth0.com/docs/secure/tokens/json-web-tokens/create-custom-claims#general-restrictions)**
>
> Learn how to create collision-resistant names for custom claims.

Thanks  
Dawid

---

<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 14, 2025, 5:01pm UTC](https://community.auth0.com/t/getting-user-roles-claim-in-id-token-as-just-roles-not-namespaces-roles/193670/4 "2025-11-14T17:01:53Z")

</div>

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