# setAppMetadata & setUserMetadata not working

**URL:** <https://community.auth0.com/t/setappmetadata-setusermetadata-not-working/133280>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [May 2, 2024, 1:30pm UTC](https://community.auth0.com/t/setappmetadata-setusermetadata-not-working/133280 "2024-05-02T13:30:22Z")\
**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 10, 2024, 9:06pm UTC](https://community.auth0.com/t/setappmetadata-setusermetadata-not-working/133280/3 "2024-05-10T21:06:44Z")

</div>

Hey @anonetics welcome to the community!

Sorry for the delayed response here - As noted in the following post, adding app and or user metadata to users should be done in pre registration or post login actions:

> [@Update App Meta Data from Post User Registration](https://community.auth0.com/t/update-app-meta-data-from-post-user-registration/62720/4):
>
> Hi @techdynamism, I just tested out your code in my own tenant, and it seems to make the update on the user, although the user ID is referenced with event.user.user\_id instead of event.user.id. You can find the post-user registration event object here: [Actions Triggers: post-user-registration - Event Object](https://auth0.com/docs/actions/triggers/post-user-registration/event-object). It might be helpful to log the secrets to make sure they contain the correct credentials and don’t contain quotes, etc. As a side note, since you are updating app metadata, you may want to…

---

_[View the full topic](https://community.auth0.com/t/setappmetadata-setusermetadata-not-working/133280)._
