Newer Version Available
Set User Password
Sets a user’s password based on the specified user ID. The password provided in the
request body replaces the user’s existing password. This resource is available in REST API version
24.0 and later.
You can only set one password per request. The new password must conform to the password policies for the organization, otherwise an INVALID_NEW_PASSWORD error is returned.
If the session doesn’t have permission to access the user information, an INSUFFICIENT_ACCESS error is returned.
Syntax
- URI
- /services/data/vXX.X/sobjects/User/userId/password
- Formats
- JSON, XML
- HTTP Method
- POST
- Authentication
- Authorization: Bearer token
- Parameters
- None required
Example
For examples of getting password information, setting a password, and resetting a password, see Manage User Passwords.