# How to update email and phone\_number simultaneously on update user call?

**URL:** <https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089>\
**Category:** Get Help\
**Tags:** user\
**Created:** [May 25, 2022, 8:55pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089 "2022-05-25T20:55:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunjan.Parmar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gunjan.parmar/32/35013_2.png) [@Gunjan.Parmar](https://community.auth0.com/u/Gunjan.Parmar)\
**Post date:** [May 25, 2022, 8:55pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/1 "2022-05-25T20:55:27Z")

</div>

I am trying to update user email and phone\_number using [patch /api/v2/users/{id}](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id) but getting `"Cannot update email and phone_number simultaneously"` error.

I understand that there are some cases mentioned where I cannot update certain combination simultaneously, but I do not see this on the doc. Unless the doc is not up-to-date. What am I missing here?

If this is Auth0 restriction, what is the recommended approach to do so?

Request:

```auto
{
  "given_name": "LastName",
  "family_name": "firstName",
  "email": "test@email.com",
  "phone_number": "+19999999999"
}

```

Response:

```auto
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Cannot update email and phone_number simultaneously",
    "errorCode": "operation_not_supported"
}

```

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [May 25, 2022, 10:40pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/3 "2022-05-25T22:40:01Z")

</div>

Hi @Gunjan.Parmar ,

Thank you for posting this topic on the Auth0 Community!

The email and phone\_number are associated with [Email](https://auth0.com/docs/authenticate/passwordless/authentication-methods/email-otp) and [SMS](https://auth0.com/docs/authenticate/passwordless/authentication-methods/sms-otp) connections respectively. They are the two types of connections for the [Passwordless](https://auth0.com/docs/authenticate/passwordless) Authentication.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/f/df2b94dae5012619b257081538f35a0fb2a7b33a.jpeg)  
  
  
A user can have either the SMS connection type, for which we can only update the phone number, or the Email connection type, for which we can only update the email. Therefore we can not update both fields simultaneously.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Gunjan.Parmar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gunjan.parmar/32/35013_2.png) [@Gunjan.Parmar](https://community.auth0.com/u/Gunjan.Parmar)\
**Post date:** [May 26, 2022, 2:10pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/4 "2022-05-26T14:10:50Z")

</div>

Hello Lihua,  
What if my connection type is `Username-Password-Authentication`?

 ![Screen Shot 2022-05-26 at 10.11.08 AM](https://global.discourse-cdn.com/auth0/original/3X/5/b/5b3021c8fb68ab348cf55c853ec494fec32cea46.png)

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [May 26, 2022, 5:51pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/5 "2022-05-26T17:51:42Z")

</div>

Hi @Gunjan.Parmar ,

For `Username-Password-Authentication` connection, the phone number field is not in the UI if checking the setting of the user and we can not update it.

---

<div class="post-metadata">

**Author:** ![Gunjan.Parmar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gunjan.parmar/32/35013_2.png) [@Gunjan.Parmar](https://community.auth0.com/u/Gunjan.Parmar)\
**Post date:** [May 26, 2022, 5:58pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/6 "2022-05-26T17:58:23Z")

</div>

Got it. As always, thank you so much for your help.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [May 26, 2022, 5:59pm UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/7 "2022-05-26T17:59:11Z")

</div>

You are very welcome 😁

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 22, 2022, 9:32am UTC](https://community.auth0.com/t/how-to-update-email-and-phone-number-simultaneously-on-update-user-call/84089/8 "2022-12-22T09:32:35Z")

</div>


