# Unable to update user's email address

**URL:** <https://community.auth0.com/t/unable-to-update-users-email-address/14820>\
**Category:** Get Help\
**Tags:** update-user-email, auth0\
**Created:** [August 29, 2018, 10:23am UTC](https://community.auth0.com/t/unable-to-update-users-email-address/14820 "2018-08-29T10:23:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![efernandes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/efernandes/32/10568_2.png) [@efernandes](https://community.auth0.com/u/efernandes)\
**Post date:** [August 29, 2018, 10:23am UTC](https://community.auth0.com/t/unable-to-update-users-email-address/14820/1 "2018-08-29T10:23:36Z")

</div>

We are trying to call the [Management API Reference - Auth0 Docs](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id) to update a users email.

For some reason when we invoke the above api to update a users email, it calls the GET user script on our custom database. This makes no sense as we have the toggle button enabled to automatically migrate users to auth0 when they login.

We can use any help we can get

---

<div class="post-metadata">

**Author:** ![jerdog](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jerdog/32/11231_2.png) [@jerdog](https://community.auth0.com/u/jerdog)\
**Post date:** [August 29, 2018, 1:12pm UTC](https://community.auth0.com/t/unable-to-update-users-email-address/14820/3 "2018-08-29T13:12:47Z")

</div>

Can you share with us the code you’re using (remove any identifiable bits) so that we can help you troubleshoot?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [September 27, 2018, 8:46pm UTC](https://community.auth0.com/t/unable-to-update-users-email-address/14820/6 "2018-09-27T20:46:38Z")

</div>

This issue was resolved through support, however I’d like to share the details here for future developers who encounter this issue.

Even though the user being updated has already been migrated, if we are changing the email address then the _get user_ scripts will be invoked in order to check that the new email is NOT associated to a user that hasn’t been migrated yet.

---

<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:** [November 6, 2018, 1:29am UTC](https://community.auth0.com/t/unable-to-update-users-email-address/14820/7 "2018-11-06T01:29:26Z")

</div>

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