# auth0.users.updateAppMetadata() in action

**URL:** <https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154>\
**Category:** Get Help\
**Tags:** account-linking, user-management\
**Created:** [September 16, 2024, 10:06am UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154 "2024-09-16T10:06:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganesh.kumaresan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ganesh.kumaresan/32/49201_2.png) [@ganesh.kumaresan](https://community.auth0.com/u/ganesh.kumaresan)\
**Post date:** [September 16, 2024, 10:06am UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154/1 "2024-09-16T10:06:41Z")

</div>

Ready to post? 🔍 First, try searching for your answer.

Hi Team,

I am looking on alternative for auth0.users.updateAppMetadata(user.user\_id, appMetadata) and auth0.users.updateUserMetadatda(user.user\_id, userMetadata). Is this still available in auth0 action.

This is something i am using for linking users in rules.

Can u pls help me, how to handle this in auth0 action!

Thanks,

---

<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:** [September 16, 2024, 2:53pm UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154/3 "2024-09-16T14:53:25Z")

</div>

Hey there @ganesh.kumaresan !

In Actions you can use the `api` object to both set `userMetadata` and `appMetadata`:

> **[Manage User Metadata with the post-login Action Trigger](https://auth0.com/docs/manage-users/user-accounts/metadata/manage-user-metadata)**
>
> Learn how to use the post-login Action trigger to modify user\_metadata and app\_metadata as part of a user’s login flow.

---

<div class="post-metadata">

**Author:** ![ganesh.kumaresan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ganesh.kumaresan/32/49201_2.png) [@ganesh.kumaresan](https://community.auth0.com/u/ganesh.kumaresan)\
**Post date:** [September 16, 2024, 3:59pm UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154/4 "2024-09-16T15:59:12Z")

</div>

Thanks Tyf,

I understand that we could update/add field in app/user metadata. But I believe auth0.users.updateAppMetadata() replace user’s entire meta data. Is there any possible way to replace the entire meta data in auth0 actions which auth0.users.updateAppMetadata() do in rules!

---

<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:** [September 16, 2024, 6:43pm UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154/5 "2024-09-16T18:43:12Z")

</div>

Gotcha, thanks for clarifying!

There isn’t a way to delete/replace metadata in that way using the `api` object in Actions - You’ll want to instead use the Management API in your Action for additional functionality:

[https://community.auth0.com/t/using-the-management-api-in-actions/64947](https://community.auth0.com/t/using-the-management-api-in-actions/64947)

---

<div class="post-metadata">

**Author:** ![ganesh.kumaresan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ganesh.kumaresan/32/49201_2.png) [@ganesh.kumaresan](https://community.auth0.com/u/ganesh.kumaresan)\
**Post date:** [September 17, 2024, 5:24am UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154/6 "2024-09-17T05:24:04Z")

</div>

Thank you @ty.frith for the clear explanation on this!

---

<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:** [October 1, 2024, 5:24am UTC](https://community.auth0.com/t/auth0-users-updateappmetadata-in-action/147154/7 "2024-10-01T05:24:05Z")

</div>

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