Management API getting Internal Server Error (500) on User Update

Hi,

I’m trying to update an user’s email through the Auth0 Management API, but i’m getting a response code 500,
and all the response looks like these:

{
  "statusCode": 500,
  "error": "Internal Server Error",
  "message": "An internal server error occurred",
  "errorCode": "auth0_idp_error"
}

I’m sending the user id and the body look like this:

{
  "email": "new@mail.com",
  "connection": "myConnection",
  "client_id": "myClientID"
}

and the complete log shows me this:

{
  "date": "2017-04-17T14:39:04.764Z",
  "type": "fce",
  "description": "unknown error",
  "connection": "myConnection",
  "connection_id": "con_id",
  "client_id": "myClientID",
  "client_name": "API Explorer Client",
  "ip": "127.0.0.1",
  "user_agent": "unknown",
  "details": {
    "body": {
      "tenant": "myTenant",
      "client_id": "myClientID",
      "connection": "myConnection",
      "email": "old@email.com",
      "newEmail": "new@email.com",
      "verify": false,
      "email_verified": false
    }
  },
  "user_id": "auth0|284",
  "user_name": "ild@email.com",
  "strategy": "auth0",
  "strategy_type": "database",
  "log_id": "49560429270835143462026061565489236542068962608623386626"
}

Why do you think this is happening?

Regards

Can you clarify what endpoint you are calling?

To update a user’s email, you simply need to call the /api/v2/users/{id} endpoint, outlined in the API docs, with the following body:

{
  "email":"new@email.com"
}

Hi @prashant,
Thanks for your answer, i’m using that endpoint for my client (https://eduardoramirez.auth0.com/api/v2/users/auth0|333), and testing generating my token to authenticate, i added the connection, and clientID, because in the instructions said so:

If your are updating email or
phone_number you need to specify the
connection and the client_id
properties

Regards