# How to get user metadata using @auth0/auth0-spa-js?

**URL:** <https://community.auth0.com/t/how-to-get-user-metadata-using-auth0-auth0-spa-js/66047>\
**Category:** Get Help\
**Tags:** auth0-spa-js\
**Created:** [July 13, 2021, 2:48am UTC](https://community.auth0.com/t/how-to-get-user-metadata-using-auth0-auth0-spa-js/66047 "2021-07-13T02:48:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandeep.s.gulati](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mandeep.s.gulati/32/28866_2.png) [@mandeep.s.gulati](https://community.auth0.com/u/mandeep.s.gulati)\
**Post date:** [July 13, 2021, 2:48am UTC](https://community.auth0.com/t/how-to-get-user-metadata-using-auth0-auth0-spa-js/66047/1 "2021-07-13T02:48:23Z")

</div>

How can I get user metadata while using the `getUser()` method of `auth0-spa-js` SDK?

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [July 13, 2021, 4:40am UTC](https://community.auth0.com/t/how-to-get-user-metadata-using-auth0-auth0-spa-js/66047/2 "2021-07-13T04:40:08Z")

</div>

Hello @mandeep.s.gulati ,

Have you tried this:

> [@\[React\] Get permissions for authenticated user through Auth0Client.getUser()](https://community.auth0.com/t/react-get-permissions-for-authenticated-user-through-auth0client-getuser/37593):
>
> Hello! I currently have an Auth0 SPA React application, which I made following this tutorial: [Auth0 React SDK Quickstarts: Login](https://auth0.com/docs/quickstart/spa/react) How do I get the defined user permissions of a user when a user is successfully authenticated? The Auth0Client.getUser() does not provide this. Greetings

I think adding custom claims in the ID token should help.

Regards,  
Sidharth

---

<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:** [July 28, 2021, 4:40am UTC](https://community.auth0.com/t/how-to-get-user-metadata-using-auth0-auth0-spa-js/66047/3 "2021-07-28T04:40:16Z")

</div>

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