# Cannot update user metadata in post-user-registration hook

**URL:** <https://community.auth0.com/t/cannot-update-user-metadata-in-post-user-registration-hook/7293>\
**Category:** Get Help\
**Tags:** hooks\
**Created:** [June 28, 2017, 3:13am UTC](https://community.auth0.com/t/cannot-update-user-metadata-in-post-user-registration-hook/7293 "2017-06-28T03:13:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![morephoneteam](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@morephoneteam](https://community.auth0.com/u/morephoneteam)\
**Post date:** [June 28, 2017, 3:13am UTC](https://community.auth0.com/t/cannot-update-user-metadata-in-post-user-registration-hook/7293/1 "2017-06-28T03:13:08Z")

</div>

The below doesn’t save user\_metadata:

```
/* @param {object} user.user_metadata - user metadata*/
module.exports = function (user, context, cb) {
  // Perform any asynchronous actions, e.g. send notification to Slack. 
  user.user_metadata = { "someinfo": "abcd" };
  cb();
};

```

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [June 28, 2017, 9:46pm UTC](https://community.auth0.com/t/cannot-update-user-metadata-in-post-user-registration-hook/7293/2 "2017-06-28T21:46:04Z")

</div>

According to the [docs](https://auth0.com/docs/hooks/extensibility-points) the post-user registration hook is intended to:

> implement custom actions that execute asynchronously from the Auth0 authentication process after a new user registers and is added to the database

If you want to customize the user metadata you should experiment with the [pre-user registration](https://auth0.com/docs/hooks/extensibility-points/pre-user-registration) hook which states that can be used to:

> prevent user registration and **add custom metadata to a newly-created user**

---

<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:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/cannot-update-user-metadata-in-post-user-registration-hook/7293/3 "2018-03-02T05:55:00Z")

</div>


