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

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?

1 Like

I am also wondering the same.

This works

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

and this does not work

api.accessToken.setCustomClaim("scp", ["global:rw"]);
1 Like

I see this is somewhat documented here:

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.

1 Like

So it is kind of like prefixing custom elements in HTML