Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I need the current (old) password of user to change the new password. where i have to get the old password, i want that Functionality code
Users["Hari"].ChangePassword({
newPasswordConfirm:"xxxxx" /* STRING */,
oldPassword:"yyyyy" /* STRING */,
newPassword:"xxxxx" /* STRING */});
Solved! Go to Solution.
Hello @Hariharasuthan ,
In ThingWorx, the password is stored after being processed by a hash algorithm. The algorithm is a one direction conversation. There is no method to get the original value restored. If your goal is to get the original password value it is not available.
Regards,
I don't think retrieving another user's password through the service is possible.
But if you want to change the password if the user forgets it. You can use the below code
var params = {
newPasswordConfirm: "newPassword"/* STRING */,
newPassword: "newPassword"/* STRING */
};
// no return
Users[<<USERNAME>>].AssignNewPassword(params);
Refer to this article - Article - CS286225 - Create a Mashup for a login user to change the password in ThingWorx (ptc.com)
/ VR
Hello,
If you are looking for a way for the user to reset their password, perhaps this is a good place to start.
The post is quite old, so I am not sure if it works anymore but I thought it could be worth posting it.
Regards,
Jens
Hello @Hariharasuthan ,
In ThingWorx, the password is stored after being processed by a hash algorithm. The algorithm is a one direction conversation. There is no method to get the original value restored. If your goal is to get the original password value it is not available.
Regards,