Fetch specific key value pair from user_metadata

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.

Hey there!

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

1 Like

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

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:

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