# useUser() in nextjs SDK is not giving the full user details for the user

**URL:** <https://community.auth0.com/t/useuser-in-nextjs-sdk-is-not-giving-the-full-user-details-for-the-user/195403>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [December 11, 2025, 6:27am UTC](https://community.auth0.com/t/useuser-in-nextjs-sdk-is-not-giving-the-full-user-details-for-the-user/195403 "2025-12-11T06:27:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaitrk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chaitrk/32/70985_2.png) [@chaitrk](https://community.auth0.com/u/chaitrk)\
**Post date:** [December 11, 2025, 6:27am UTC](https://community.auth0.com/t/useuser-in-nextjs-sdk-is-not-giving-the-full-user-details-for-the-user/195403/1 "2025-12-11T06:27:35Z")

</div>

Hi Team,

We are using the useUser() client side method in nextjs SDK to retrieve the user details i am getting only the basic user profile, not getting any usermetadata attributes, though i have added the usermetadata as claims in the ID token, getting the details correctly in ID token but not in useUser() response why?  
can anyone suggest what might be the issue

 ![image](https://global.discourse-cdn.com/auth0/original/3X/0/a/0ad67852a6b52a5da1f91ff927d7d823f701c98b.png)

Regards,  
Chaitra k.

---

<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:** [December 11, 2025, 3:49pm UTC](https://community.auth0.com/t/useuser-in-nextjs-sdk-is-not-giving-the-full-user-details-for-the-user/195403/3 "2025-12-11T15:49:53Z")

</div>

Hi @chaitrk

Welcome back to the Auth0 Community!

In the case of the NextJS SDK, the client must be configured to save the additional claims added to the token otherwise they will be filtered out since they are not part of the default claims. You can read more about that in our [documentation](https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#beforesessionsaved) and this small [tutorial](https://community.auth0.com/t/an-introduction-to-custom-claims/191589) I have made on our DevHub forum.  
You will need to add the following piece of code to your application in order for any added custom claims to be included.

```auto
import { Auth0Client } from "@auth0/nextjs-auth0/server";

export const auth0 = new Auth0Client({
  async beforeSessionSaved(session, idToken) {
    return session;
  }
});

```

Let me know if that does the trick.

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:** [December 25, 2025, 3:49pm UTC](https://community.auth0.com/t/useuser-in-nextjs-sdk-is-not-giving-the-full-user-details-for-the-user/195403/4 "2025-12-25T15:49:58Z")

</div>

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