DevOps System Administrator Jahia 8.2

How to change the password of a user thanks to GraphQL?

Question

How to change the password of a user thanks to GraphQL?

Answer

Yes, it can be done thanks to this payload: 

mutation {
  jcr(workspace: EDIT) {
    mutateNode(pathOrId: "/users/ei/ij/jj/anne") {
      mutateProperty(name: "j:password") {
        setValue(type: STRING, value: "test")
      }
    }
  }
}

Please note that the password value needs to be hashed for the authentication to really work.

This only applies until the 8.2.2.0, future versions will have a validation mechanism.