# Setting user\_metadata in Action does not work if login is denied

**URL:** <https://community.auth0.com/t/setting-user-metadata-in-action-does-not-work-if-login-is-denied/73446>\
**Category:** Get Help\
**Tags:** login\
**Created:** [November 19, 2021, 10:33am UTC](https://community.auth0.com/t/setting-user-metadata-in-action-does-not-work-if-login-is-denied/73446 "2021-11-19T10:33:55Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![jack.macdonald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jack.macdonald/32/12764_2.png) [@jack.macdonald](https://community.auth0.com/u/jack.macdonald)\
**Post date:** [April 29, 2022, 1:32pm UTC](https://community.auth0.com/t/setting-user-metadata-in-action-does-not-work-if-login-is-denied/73446/15 "2022-04-29T13:32:40Z")

</div>

We’ve had to use the auth0 package within the action, and use the ManagementClient on that to set users app metadata instead. Similar to [Is there a way to access user management api from a post-password-change action? - #2 by thameera](https://community.auth0.com/t/is-there-a-way-to-access-user-management-api-from-a-post-password-change-action/66823/2)

---

_[View the full topic](https://community.auth0.com/t/setting-user-metadata-in-action-does-not-work-if-login-is-denied/73446)._
