# How to get user meta from /userinfo endpoint?

**URL:** <https://community.auth0.com/t/how-to-get-user-meta-from-userinfo-endpoint/106000>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [May 2, 2023, 4:54pm UTC](https://community.auth0.com/t/how-to-get-user-meta-from-userinfo-endpoint/106000 "2023-05-02T16:54:06Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 2, 2023, 10:35pm UTC](https://community.auth0.com/t/how-to-get-user-meta-from-userinfo-endpoint/106000/3 "2023-05-02T22:35:01Z")

</div>

Hey again @kkrp1 !

> [@kkrp1](#):
>
> That last sentence could definitely do with some elaboration. In any case, I went to Rules, created a rule from the “Move user metadata attributes to profile root attributes” template. I saved it. But I still don’t get user meta returned in the profile.

I would use a [post-login Action](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow) to add custom meta\_data claims to tokens instead - I just verified the following works:

```auto
exports.onExecutePostLogin = async (event, api) => {
  const namespace = 'https://my-app.example.com';
  if (event.authorization) {
    api.idToken.setCustomClaim(`${namespace}/user_metadata`, event.user.user_metadata);
    api.idToken.setCustomClaim(`${namespace}/app_metadata`, event.client.metadata);
  }
};

```

Some more on custom claims in general:

[https://community.auth0.com/t/adding-custom-claims-to-tokens/84590](https://community.auth0.com/t/adding-custom-claims-to-tokens/84590)

Hope this helps!

---

_[View the full topic](https://community.auth0.com/t/how-to-get-user-meta-from-userinfo-endpoint/106000)._
