While Updating a User, their Display Name Changes

When doing an update (users/patch-users-by-id) on a user, updating their phone number for example, the display name on auth0 for that user changes from their email, to their nickname.

Any reason for this? Can we control this in anyway?

Hi @carl.t.

It looks like you do not have a Passwordless SMS connection. Looking further, I noticed your users have their phone numbers saved to their user_metadata.

When updating the user’s phone number in the user_metadata, it should not alter the user’s display name or change their email to their nickname.

If this is happening, you could workaround by updating the user with the name or email value of the preferred value.

I hope this helps!


@rueben.tiow Thanks for the response.

Any ideas WHY this might be happening?

Hi @carl.t,

Thanks for following up.

I do not know why this is happening since it should not be happening. However, I suspect it might involve the request made to the Management API’s Update a user endpoint.

If possible, could you please share the request you made to update a user?


Hi @rueben.tiow,

An example of our request below:

	"client_id": "s6ituTn1vcEEQa2d0DWO0Kxe8UrBT85P",
	"name": "solushome230710204520@sttesting.net",
	"verify_phone_number": false,
	"email": "solushome230710204520@sttesting.net",
	"user_metadata": {
		"phone_number": "0877777777"
	"app_metadata": null,
	"connection": "XXXXXX",
	"verify_email": true

This would be an example of adding a phone number for a user.

Using endpoint PATCH /users/{id}

Hi @carl.t,

Thanks for following up.

I have just tested your sample body to update a user and did not encounter the same issues you observed.

Instead, I was able to successfully update a user, and the name and email properties match the ones being passed in the request.

See below:

With that, I am confident that your request should not update the name and email properties.


@rueben.tiow thanks for the response. After testing the api call separately, i too am confident that that is not the issue. It looks like the issue occurs when using the front end to evoke this api call. Not sure where exactly as still investigating, but what i am talking about is explained below:

This shows full email as name:

After update, it changes to below, even though we only update the phone number:

The issue appears to be resolved. We were passing null for email when only updating the phone number, and mapping that null to “Name”. This caused the name to be null, and i suspect if name is null, it falls back on to the “Nickname” to display.

1 Like

HI @carl.t,

Thanks for following up.

I’m glad you were able to identify and resolve the issue, which involved passing a value to the “Name” attribute.

Please let us know if you have any additional questions. We’d be happy to help!


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