Newer Version Available

This content describes an older version of this product. View Latest

sObject User Password

Sets, resets, or gets information about a user password. This resource is available in REST API version 24.0 and later.

URI
/services/data/vXX.X/sobjects/User/user_Id/password

For managing passwords for self-service users, the URI is:

/services/data/vXX.X/sobjects/SelfServiceUser/self_service_user_Id/password

Formats
JSON, XML
HTTP Method
HEAD, GET, POST, DELETE
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.
Considerations
  • If the session does not have permission to access the user information, an INSUFFICIENT_ACCESS error will be returned.
  • When using this resource to set a new password, the new password must conform to the password policies for the organization, otherwise you will get an INVALID_NEW_PASSWORD error response.
  • You can only set one password per request.
  • When you use the DELETE method of this resource, Salesforce will reset the user password to an auto-generated password, which will be returned in the response.