Auth0 Home Blog Docs

Cannot update username for users without a username already set

tier1
username

#1

This API (https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id) does not allow setting a username on an existing user profile that did not initially have username set. (The API returns a 400 with error message “Cannot update username for users without an username already set” if you try to.)

We initially had users sign up with just email/password. Having now toggled “Requires username”, and given this API restriction, how else should we backfill the username?

Related GH issue: https://github.com/auth0/wp-auth0/issues/343


#2

Unfortunately this is currently a limitation of our system. Though this request would be taken care of in the future, as of now updating the user’s username for this use case cannot be done.

A potential solution, albeit a little inconvenient, would be to backup a user’s metadata and any other information, delete it, and re-create the account with a username.


#3

Unfortunately this is currently a limitation of our system. Though this request would be taken care of in the future, as of now updating the user’s username for this use case cannot be done.

A potential solution, albeit a little inconvenient, would be to backup a user’s metadata and any other information, delete it, and re-create the account with a username.


#4