# POST user does not set user\_metadata

**URL:** <https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691>\
**Category:** Get Help\
**Tags:** user\
**Created:** [February 22, 2022, 8:08am UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691 "2022-02-22T08:08:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel.degrassi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daniel.degrassi/32/33194_2.png) [@daniel.degrassi](https://community.auth0.com/u/daniel.degrassi)\
**Post date:** [February 22, 2022, 8:08am UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691/1 "2022-02-22T08:08:19Z")

</div>

I’m making a request to create a user to https://[DOMAIN].eu.auth0.com/api/v2/users. I’ve followed the documentation [here](https://auth0.com/docs/manage-users/user-accounts/metadata/manage-metadata-api). I’ve sent the request via axios (nodejs) and Postman with the same result.

This creates the user, but does not set any user\_metadata. Everything else is set, including app\_metadata.

My request body:

```auto
{
    "name": "xxxx",
    "email": "jane.doe@example.com",
    "connection": "xxxx",
    "password": "xxxx",
    "user_metadata": {
        "hobby": "surfing"
    },
    "app_metadata": {
        "plan": "full"
    }
}

```

In auth0, the user does not have user\_metadat and my response returns, amongst other things,

```auto
    "user_metadata": {},

```

I’ve been unable to figure out what I’m doing wrong here, and would appreciate some clarification. Thanks.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 23, 2022, 12:58am UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691/3 "2022-02-23T00:58:53Z")

</div>

Hi @daniel.degrassi ,

Welcome to Auth0 Community!

We are looking into this query and will get back to you soon.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 23, 2022, 1:14am UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691/4 "2022-02-23T01:14:40Z")

</div>

Hi @daniel.degrassi ,

I tested with axios (nodejs) and Postman and the user\_metadata was added successfully. Your scripts look correct!

Do you have any rules or actions that could cause the user\_metadata not inserted by the scripts?

Thanks!

---

<div class="post-metadata">

**Author:** ![daniel.degrassi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daniel.degrassi/32/33194_2.png) [@daniel.degrassi](https://community.auth0.com/u/daniel.degrassi)\
**Post date:** [February 23, 2022, 10:15am UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691/5 "2022-02-23T10:15:25Z")

</div>

Apparently someone had previously set a hook that was using some context, which in our case was undefined, to overwrite what was sent in the request. Thanks for the quick response and the point in the right direction!

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 23, 2022, 4:30pm UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691/6 "2022-02-23T16:30:30Z")

</div>

Thank you for the updates. Please feel free to reach us if any other queries.

Have a great rest of your day!

---

<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 10, 2022, 4:31pm UTC](https://community.auth0.com/t/post-user-does-not-set-user-metadata/78691/7 "2022-03-10T16:31:17Z")

</div>

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