# How to edit given\_name and family name for account with pwd-auth and google-oauth2

**URL:** <https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267>\
**Category:** Get Help\
**Created:** [October 27, 2022, 9:37pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267 "2022-10-27T21:37:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![swifteam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/swifteam/32/33281_2.png) [@swifteam](https://community.auth0.com/u/swifteam)\
**Post date:** [October 27, 2022, 9:37pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267/1 "2022-10-27T21:37:23Z")

</div>

This account has both a Google auth connection and a Pwd Auth database after [linking them together](https://community.auth0.com/t/notify-user-that-he-previously-uses-social-login/87316/2). When updating given\_name and familly\_name, we received an error. How can update the name to the database connection instead?

> The following user attributes cannot be updated: name. The connection (google-oauth2) must either be a database connection (using the Auth0 store)

```auto
[
  {
    "provider": "google-oauth2",
    "user_id": "107469007964388287664",
    "connection": "google-oauth2",
    "isSocial": true
  },
  {
    "profileData": {
      "email": "account@company.com",
      "email_verified": true,
      "last_password_reset": "2022-10-19T01:02:34.061Z"
    },
    "connection": "Username-Password-Authentication",
    "provider": "auth0",
    "user_id": "6348de7a58c1292a55d6fc59",
    "isSocial": false
  }
]

```

---

<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:** [October 27, 2022, 10:51pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267/3 "2022-10-27T22:51:29Z")

</div>

Hi @swifteam ,

I understand that you want to update the given\_name and family\_name of a linked account. Have you checked the details in [this](https://community.auth0.com/t/how-to-update-the-user-profile-details-of-the-linked-accounts/84495) FAQ?

If the error persists, please provide the body scripts and the endpoint, and I will look into this further. Thanks!

---

<div class="post-metadata">

**Author:** ![swifteam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/swifteam/32/33281_2.png) [@swifteam](https://community.auth0.com/u/swifteam)\
**Post date:** [October 30, 2022, 10:14pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267/4 "2022-10-30T22:14:30Z")

</div>

Hi @lihua.zhang

For each Google auth user, we will automatically create a pwd-auth user by default using management API. So we decide to update First, Last, and Picture to the pwd-auth account instead. But we’re getting another error: `The specified connection (Username-Password-Authentication) belongs to a secondary identity.`

```auto
params: 
"{\"connection\":\"Username-Password-Authentication\",\"picture\":\"https://lh3.googleusercontent.com/a/ALm5wu39YIpDYITxBadZzziOCGR4IdzYsM4joFJ0zBmDYw=s96-c\",\"email\":\"xxx@swifteam.com\",\"user_metadata\":{\"mobile_phone\":\"+1xxxxxxxx\"}}"

response:
{"statusCode":400,"error":"Bad Request","message":"The following user attributes cannot be updated: picture. The specified connection (Username-Password-Authentication) belongs to a secondary identity.","errorCode":"operation_not_supported"}

```

---

<div class="post-metadata">

**Author:** ![swifteam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/swifteam/32/33281_2.png) [@swifteam](https://community.auth0.com/u/swifteam)\
**Post date:** [November 1, 2022, 10:14pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267/5 "2022-11-01T22:14:54Z")

</div>

I created a new topic because this topic is not solved yet. [How to edit given\_name and family name for connection pwd-auth belongs to a secondary identity](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-connection-pwd-auth-belongs-to-a-secondary-identity/93539)

---

<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:** [November 7, 2022, 9:49pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267/6 "2022-11-07T21:49:46Z")

</div>

Hi @swifteam ,

I just replied to you in [this](https://community.auth0.com/t/make-user-pwd-connection-to-the-primary-identity-provider/93825/3) topic.

---

<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:** [February 9, 2023, 1:40pm UTC](https://community.auth0.com/t/how-to-edit-given-name-and-family-name-for-account-with-pwd-auth-and-google-oauth2/93267/7 "2023-02-09T13:40:50Z")

</div>

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