Skip to content

Latest commit

 

History

History
130 lines (99 loc) · 4.22 KB

user-changepassword.md

File metadata and controls

130 lines (99 loc) · 4.22 KB
title description ms.localizationpriority author ms.reviewer ms.subservice doc_type
user: changePassword
Update your own password.
medium
yyuank
iamut
entra-users
apiPageType

user: changePassword

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]

Permissions

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]

HTTP request

POST /me/changePassword

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-type application/json. Required.

Request body

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.

Response

If successful, this method returns a 204 No Content response code.

Example

The following example shows a request to update your own password.

Request

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]


Response

HTTP/1.1 204 No Content

Related content