---
schema_version: "1"
id: ca39b0f649b3419bbeee45a514cef2bce7a8b8250d17427a948491c5deb47736
title: Set User Password
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/resources/resources-sobject-user-password-post.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/resources-sobject-user-password-post.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6738c2fc6cc8c411d35bc28cdd7fb303d547a32890458ddc70634e7df66885d0
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# 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](https://developer.salesforce.com/docs/platform/api-rest/do-me/dome-sobject-user-password.md).

**See Also**  


-   [Object Reference for the Salesforce Platform](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/)

