| title | user: changePassword |
|---|---|
| description | Update your own password. |
| ms.localizationpriority | medium |
| author | yyuank |
| ms.reviewer | iamut |
| ms.subservice | entra-users |
| doc_type | apiPageType |
| ms.date | 08/16/2024 |
Namespace: microsoft.graph
Update the signed-in user's password. Any user can update their password without belonging to any administrator role. To update another user's password in either delegated or app-only scenarios, update the passwordProfile property of the user instead. See Example 3: Update the passwordProfile of a user and reset their password.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
POST /me/changePassword[!INCLUDE me-apis-sign-in-note]
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-type | application/json. Required. |
In the request body, provide a JSON object with the following parameters.
| Parameter | Type | Description |
|---|---|---|
| currentPassword | String | Your current password. |
| newPassword | String | Your new password. |
If successful, this method returns a 204 No Content response code.
The following example shows a request to update your own password.
POST https://graph.microsoft.com/v1.0/me/changePassword
Content-type: application/json
{
"currentPassword": "xWwvJ]6NMw+bWH-d",
"newPassword": "0eM85N54wFxWwvJ]"
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
HTTP/1.1 204 No Content