Delete Lightning Experience Event Series
Get an Image from a Rich Text Area Field
Insert or Update Blob Data
Get Blob Data
Manage User Passwords
Generating an OpenAPI 3.0 Document for sObjects REST API (Beta)
Previous Versions
Use the sObject User Password resource to set, reset, or get information about a user password. Use the HTTP GET method to get password expiration status, the HTTP POST method to set the password, and the HTTP DELETE method to reset the password.
The associated session must have permission to access the given user password information. If the session does not have proper permissions, an HTTP error 403 response is returned from these methods.
These methods are available for both users and self-service users. For managing self-service user passwords, use SelfServiceUser instead of User in the REST API URL.
Here is an example of retrieving the current password expiration status for a user:
1curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/User/005D0000001KyEIIA0/password -H "Authorization: Bearer token"None required
1{
2 "isExpired" : false
3}1<Password>
2 <isExpired>false</isExpired>
3</Password>1{
2 "message" : "You do not have permission to view this record.",
3 "errorCode" : "INSUFFICIENT_ACCESS"
4}Here is an example of changing the password for a given user:
1curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/User/005D0000001KyEIIA0/password -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @newpwd.json -X POST1{
2 "NewPassword" : "myNewPassword1234"
3}No response body on successful password change, HTTP status code 204 returned.
1{
2 "message" : "Your password must have a mix of letters and numbers.",
3 "errorCode" : "INVALID_NEW_PASSWORD"
4}And finally, here is an example of resetting a user password:
1curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/User/005D0000001KyEIIA0/password -H "Authorization: Bearer token" -X DELETENone required
1{
2 "NewPassword" : "2sv0xHAuM"
3}1<Result>
2 <NewPassword>2sv0xHAuM</NewPassword>
3</Result>See Also