Unable to send password to update in patch user management API

Hi Team,

I’m trying to update the user password from my application using management API-Patch Users.

API Docs says we have “password” parameter but in the response getting like it’s an additional parameter.

Url:
https://{domain}/api/v2/users/{userID}

The request body is like below:

{
"password ": “xxxxx”,

“connection”: “Username-Password-Authentication”
}

Response:
{

"statusCode": 400,

"error": "Bad Request",

"message": "Payload validation error: 'Additional properties not allowed: password  (consider storing them in app_metadata or user_metadata. See \"Users Metadata\" in https://auth0.com/docs/api/v2/changes for more details)'.",

"errorCode": "invalid_body"

}

I’ve gone through the several topics in the forum but I couldn’t find updating password request body anywhere.

Please instruct me on the same if I’m in wrong path:

Thanks in Advance

Hi @pratapk1102 ,

Thank you for posting this topic on Auth0 Community!

I tested this endpoint with Postman and could not repeat this issue.

I noticed that in your request body there is an extra space for the key password.

That could be the reason for the error. Could you please remove the space and give it a try?

Hi! @lihua.zhang

By the way, I have a similar problem

{"statusCode":400,"error":"Bad Request","message":"Payload validation error: 'Additional properties not allowed: “connection”,\"\"password\"\" (consider storing them in app_metadata or user_metadata. See \"Users Metadata\" in https://auth0.com/docs/api/v2/changes for more details)'.","errorCode":"invalid_body"}

Could you please explain to me what it could be?

You need to remove the double quotes from the key and value fields.
i.e.
key: password, not "password"
value: 123123Text, not "123123Text"

See the Postman example here: Building requests | Postman Learning Center

@gparascandolo, Thanks for helping! :+1:

@pythonandfriday , please let us know if any other queries around this topic.

@gparascandolo @lihua.zhang
Thank you all
it worked for me using “raw JSON” in Postman

And I find that “email” and “password” (It was needed for me) cannot be both updated in the same call

@pythonandfriday ,

That’s correct that we can not update email and password simultaneously as the operation is not supported.

@lihua.zhang I got it, thank you!

1 Like