Management API: Update user not allowing all profile claims

Why does the user-patch-endpoint not allow updates to all of the profile claims?!

For instance, you cannot update:

  • gender
  • birthdate
  • middle_name
  • preferred_username

…to name a few.

Additionally, how are you supposed to clear a user’s phone number? The endpoint validation excepts neither null nor an empty string!?

Hi @FullStackFool,

Thank you for reaching out to the Auth0 Community!

I understand that you have questions about updating the user profile attributes.

The update user endpoint does not allow you to update all of the profile claims such as the ones you shared with me because they are not a part of the user profile attributes, most of which are root attributes.

In this case, I recommend storing these attributes as part of the user_metadata and update the attributes that way.

Unfortunately, it is not possible to update the user’s phone number with a null or empty string. It expects a minimum of a + and a number. Meaning you could update their phone number with something like just the area code, for example: +1.

With that said, could you please elaborate on the reason for clearing the user’s phone number? And whether removing the user would be an option?

Looking forward to your response.

Thank you.