# User metadata set via API call in backend available on second login

**URL:** <https://community.auth0.com/t/user-metadata-set-via-api-call-in-backend-available-on-second-login/12169>\
**Category:** Get Help\
**Tags:** user-metadata\
**Created:** [June 7, 2018, 12:33pm UTC](https://community.auth0.com/t/user-metadata-set-via-api-call-in-backend-available-on-second-login/12169 "2018-06-07T12:33:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aswin.v](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@aswin.v](https://community.auth0.com/u/aswin.v)\
**Post date:** [June 7, 2018, 12:33pm UTC](https://community.auth0.com/t/user-metadata-set-via-api-call-in-backend-available-on-second-login/12169/1 "2018-06-07T12:33:28Z")

</div>

I am setting user metadata on first login via Auth0 Management API call to backend inside a rule.But how do I manage to get the updated metadata in the same login pipeline without requiring a second login.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 26, 2018, 9:35pm UTC](https://community.auth0.com/t/user-metadata-set-via-api-call-in-backend-available-on-second-login/12169/2 "2018-12-26T21:35:04Z")

</div>

Hey there @aswin.v, you can read the user metadata by the below call stated in the following [metadata doc](https://auth0.com/docs/users/guides/read-metadata). I have included a snippet of it below. Please let me know if you have any additional questions on the subject!we have a doc here that dives into

> Using the Lock library, you can read the user’s `user_metadata` properties the same way you would read any other user profile property. This example retrieves the value associated with `user_metadata.hobby` using the example user metadata listed above:
> 
> ```auto
> lock.getUserInfo(accessToken, function(error, profile) {
> if (!error) {
> document.getElementById('hobby').textContent = profile.user_metadata.hobby;
> }
> });
> 
> ```

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [January 2, 2019, 1:35pm UTC](https://community.auth0.com/t/user-metadata-set-via-api-call-in-backend-available-on-second-login/12169/4 "2019-01-02T13:35:19Z")

</div>

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