# Why are some claims visible at the Auth0 user profile and not in the id\_token jtw payload?

**URL:** <https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827>\
**Category:** Get Help\
**Tags:** laravel, auth0\
**Created:** [November 26, 2021, 5:05pm UTC](https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827 "2021-11-26T17:05:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lasse/32/33287_2.png) [@lasse](https://community.auth0.com/u/lasse)\
**Post date:** [November 26, 2021, 5:05pm UTC](https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827/1 "2021-11-26T17:05:21Z")

</div>

Hi there.

Why are some claims visible at the Auth0 user profile and not in the id\_token jtw payload? I’m specifically missing the `sid` claim needed for Front Channel Logout, which is visible at the users prorfile at Auth0 after logging in with the OIDC, but it’s not visible in the decoded jwt payload.

For completeness: I’m building the app of off Laravel with the socialite Auth0 provider ([GitHub - SocialiteProviders/Auth0: [READ ONLY] Subtree split of the SocialiteProviders/Auth0 Provider (see SocialiteProviders/Providers)](https://github.com/SocialiteProviders/Auth0)).

Any help is appreciated

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lasse/32/33287_2.png) [@lasse](https://community.auth0.com/u/lasse)\
**Post date:** [November 27, 2021, 8:59am UTC](https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827/2 "2021-11-27T08:59:06Z")

</div>

Just tried the Auth0 Laravel example app ([GitHub - auth0-samples/auth0-laravel-php-web-app: Auth0 Integration Samples for Laravel Web Applications](https://github.com/auth0-samples/auth0-laravel-php-web-app)), and the decoded `token_id` payload doesn’t contain a `sid` (session id) claim eventhough the Auth0 user profile does:

 ![Screenshot 2021-11-27 at 09.55.20](https://global.discourse-cdn.com/auth0/original/3X/e/b/eb2addabea3cdfad580887621a95d9bcc20c1337.png)

Is Auth0 somehow masking the `client_id` claims?

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lasse/32/33287_2.png) [@lasse](https://community.auth0.com/u/lasse)\
**Post date:** [November 28, 2021, 6:20pm UTC](https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827/3 "2021-11-28T18:20:33Z")

</div>

Solved it by adding the following rule to Auth0:

```auto

function addSidToIdToken(user, context, callback) {
  // This rule adds the authenticated user's session id (sid) to the id token.

  const namespace = 'https://example.com/';
  
  context.idToken[namespace + 'sid'] = user.sid;
  
  callback(null, user, context);
}

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 7, 2021, 2:35pm UTC](https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827/4 "2021-12-07T14:35:38Z")

</div>

Wooohooo! Glad you figured it out and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 7, 2021, 2:35pm UTC](https://community.auth0.com/t/why-are-some-claims-visible-at-the-auth0-user-profile-and-not-in-the-id-token-jtw-payload/73827/5 "2021-12-07T14:35:41Z")

</div>


