# What does "Name of the claim (note that this may need to be a fully-qualified URL)." mean for custom claims

**URL:** <https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638>\
**Category:** Get Help\
**Tags:** custom-claims, claims\
**Created:** [June 21, 2022, 4:09pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638 "2022-06-21T16:09:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jgleason/32/25904_2.png) [@jgleason](https://community.auth0.com/u/jgleason)\
**Post date:** [June 21, 2022, 4:09pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638/1 "2022-06-21T16:09:26Z")

</div>

I am setting a custom claim like this…

`api.accessToken.setCustomClaim(`…`, event.user.app_metadata.corporation_id);`

Is there a reason in this case to need a url for the claim name as describe?

---

<div class="post-metadata">

**Author:** ![kpritam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kpritam/32/37798_2.png) [@kpritam](https://community.auth0.com/u/kpritam)\
**Post date:** [June 22, 2022, 6:16pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638/3 "2022-06-22T18:16:01Z")

</div>

I am also wondering the same.

This works

```auto
api.accessToken.setCustomClaim(`${namespace}/scp`, ["global:rw"]);

```

and this does not work

```auto
api.accessToken.setCustomClaim("scp", ["global:rw"]);

```

---

<div class="post-metadata">

**Author:** ![kpritam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kpritam/32/37798_2.png) [@kpritam](https://community.auth0.com/u/kpritam)\
**Post date:** [June 22, 2022, 6:19pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638/4 "2022-06-22T18:19:29Z")

</div>

I see this is somewhat documented here:

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

---

<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:** [June 22, 2022, 7:12pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638/5 "2022-06-22T19:12:29Z")

</div>

Thanks for sharing @kpritam! That’s correct - All custom claims require namespaced identifiers. This is enforced to avoid potential collisions with standard OIDC/OAuth claims.

---

<div class="post-metadata">

**Author:** ![jgleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jgleason/32/25904_2.png) [@jgleason](https://community.auth0.com/u/jgleason)\
**Post date:** [June 22, 2022, 8:42pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638/6 "2022-06-22T20:42:52Z")

</div>

So it is kind of like prefixing custom elements in HTML

---

<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:** [July 7, 2022, 8:43pm UTC](https://community.auth0.com/t/what-does-name-of-the-claim-note-that-this-may-need-to-be-a-fully-qualified-url-mean-for-custom-claims/85638/7 "2022-07-07T20:43:40Z")

</div>

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