Password Reset Issued by REST request

Last modified 08 Feb 2024 14:54 +01:00
Table of Contents


Example of Password reset with the use of the REST interface. The password is provided inside the request body.

For the purpose of the sample we are using the CURL tool as it is a well maintained, well tested, and it’s widely accessible.

Execute password reset for user

Please see note:

This example also needs a configuration change in the system global security policy. You have to enable the password reset feature in you configuration, please see this page.

# Authenticating with the credentials "administrator" and password "y0uR_P455woR*d" on a localhost instance running on port 8080
curl --user administrator:y0uR_P455woR*d -H "Accept: application/json" -H "Content-Type: application/json" -X POST http://localhost:8080/midpoint/ws/rest/users/e297a878-89da-43fa-b67a-d0316975388a/credential --data-binary @pathToMidpointGit\samples\rest\user-pwd-reset.json
Show data source example for "Execute password reset for user" | GitHub
  "executeCredentialResetRequest": {
    "resetMethod": "passwordReset",
    "userEntry": "5ecr3tP4s5w0rd"

The response is an HTTP 200 code in case of success with a response body.

Show example output for "Execute password reset for user"
  "@ns" : "",
  "object" : {
    "@type" : "",
    "message" : {
      "@type" : "c:SingleLocalizableMessageType",
      "key" : "execute.reset.credential.successful",
      "fallbackMessage" : "Reset password was successful"
Was this page helpful?
Thanks for your feedback