# Serialize user\_metadata in req.user object

**URL:** <https://community.auth0.com/t/serialize-user-metadata-in-req-user-object/55362>\
**Category:** Get Help\
**Tags:** nodejs, express\
**Created:** [December 26, 2020, 6:16pm UTC](https://community.auth0.com/t/serialize-user-metadata-in-req-user-object/55362 "2020-12-26T18:16:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mshenton75](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mshenton75/32/14222_2.png) [@mshenton75](https://community.auth0.com/u/mshenton75)\
**Post date:** [December 26, 2020, 6:16pm UTC](https://community.auth0.com/t/serialize-user-metadata-in-req-user-object/55362/1 "2020-12-26T18:16:34Z")

</div>

I am using auth0 in my express app. Each user has some attributes in user\_metadata (I can see it in the user profile on the Auth0 UI), but there is no user\_metadata key on the req.user object in express. How can I get serialize the user\_metadata so I can access it from that req.user object?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 29, 2020, 7:59pm UTC](https://community.auth0.com/t/serialize-user-metadata-in-req-user-object/55362/3 "2020-12-29T19:59:02Z")

</div>

Hi @mshenton75,

Welcome to the Community!

You can add custom claims to the token, including the user’s metadata claims. This should then be available in your app. Take a look at a sample here:

> **[Sample Use Cases: Scopes and Claims](https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims)**
>
> Learn how to use scopes and claims with applications and APIs.

---

<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:** [January 21, 2021, 7:01pm UTC](https://community.auth0.com/t/serialize-user-metadata-in-req-user-object/55362/4 "2021-01-21T19:01:50Z")

</div>

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