title | description | ms.localizationpriority | author | ms.reviewer | ms.subservice | doc_type |
---|---|---|---|---|---|---|
user: changePassword |
Update your own password. |
medium |
yyuank |
iamut |
entra-users |
apiPageType |
Namespace: microsoft.graph
Enable the user to update their password. Any user can update their password without belonging to any administrator role.
[!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
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]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
HTTP/1.1 204 No Content