# Is there a way to access user management api from a post-password-change action?

**URL:** <https://community.auth0.com/t/is-there-a-way-to-access-user-management-api-from-a-post-password-change-action/66823>\
**Category:** Get Help\
**Created:** [July 26, 2021, 3:12pm UTC](https://community.auth0.com/t/is-there-a-way-to-access-user-management-api-from-a-post-password-change-action/66823 "2021-07-26T15:12:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![thameera](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thameera/32/13430_2.png) [@thameera](https://community.auth0.com/u/thameera)\
**Post date:** [July 28, 2021, 9:32am UTC](https://community.auth0.com/t/is-there-a-way-to-access-user-management-api-from-a-post-password-change-action/66823/2 "2021-07-28T09:32:54Z")

</div>

Probably the easiest way to do this is to use the [Auth0 Node SDK](https://auth0.github.io/node-auth0/) in the action. Example:

```javascript
exports.onExecutePostChangePassword = async (event) => {
  const ManagementClient = require('auth0').ManagementClient
  
  const management = new ManagementClient({
    domain: 'REPLACE_WITH_TENANT_DOMAIN',
    clientId: event.secrets.MGMT_CLIENT_ID,
    clientSecret: event.secrets.MGMT_CLIENT_SECRET
  })

  // Example
  const res = await management.getUsersByEmail(event.user.email)
  console.log(res)
};

```

Make sure that you install the `auth0` npm module (from the Modules section), and set the two secrets (from the Secrets section).

---

_[View the full topic](https://community.auth0.com/t/is-there-a-way-to-access-user-management-api-from-a-post-password-change-action/66823)._
