# Fetch specific key value pair from user\_metadata

**URL:** <https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [August 12, 2021, 3:54pm UTC](https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846 "2021-08-12T15:54:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjanashrestha36](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sanjanashrestha36/32/30739_2.png) [@sanjanashrestha36](https://community.auth0.com/u/sanjanashrestha36)\
**Post date:** [August 12, 2021, 3:54pm UTC](https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846/1 "2021-08-12T15:54:09Z")

</div>

hello guys,  
Can i only read a specific key-value pair of user\_metadata of user XYZ from auth0?  
As there are more than 20 key value pairs inside my user\_metadata, fetching all user metadata might increase the bandwidth of system.

---

<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:** [August 13, 2021, 12:55pm UTC](https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846/2 "2021-08-13T12:55:05Z")

</div>

Hey there!

How you’re fetching the user\_metadata so far? Through some SDK or directly through the Management API?

---

<div class="post-metadata">

**Author:** ![sanjanashrestha36](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sanjanashrestha36/32/30739_2.png) [@sanjanashrestha36](https://community.auth0.com/u/sanjanashrestha36)\
**Post date:** [August 15, 2021, 3:31pm UTC](https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846/3 "2021-08-15T15:31:35Z")

</div>

currently i am using “auth0”: “^2.35.1” npm package, It’s okay if you can provide the solution using management API

---

<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:** [August 16, 2021, 9:02am UTC](https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846/4 "2021-08-16T09:02:18Z")

</div>

There isn’t like a one line of code method to achieve that as it’s not possible. You will need to make use of this endpoint:

> **[Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id)**

and then simply “unwrap” the JSON file you received to access the user\_metadata dictionary and then access specific key value pair

---

<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:** [August 26, 2021, 9:21am UTC](https://community.auth0.com/t/fetch-specific-key-value-pair-from-user-metadata/67846/5 "2021-08-26T09:21:20Z")

</div>


