Cannot change user's email using Management API

Hello,

I have been trying to use the Management API to change the user’s given_name, family_name and email and while the first two fields get successfully updated, the email does not.
Following the docs and other threads I have included the connection parameter in the request and, since I am using a custom database connection, I have also configured the change_email script using the API.

The error I get is the following:

{
     "statusCode": 400,
     "error": "Bad Request",
     "message": "The specified email should be a string",
     "errorCode": "auth0_idp_error"
}

The request body looks like this:

{"email": "user@example.com", "connection": "myconnection"}

The error message says the email should be a string and I am sure it is.

Can you please help?

Hi @dcastorina

Can you post your full PATCH here?

John

Hi @john.gateley ,

The email_address was not being returned by the get_user script, fixed that and also the update is working!

Diego

1 Like