How to edit given_name and family name for account with pwd-auth and google-oauth2

This account has both a Google auth connection and a Pwd Auth database after linking them together. 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)

[
  {
    "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
  }
]

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 FAQ?

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

1 Like

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.

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"}

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

Hi @swifteam ,

I just replied to you in this topic.

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