Skip to main content
13-Aquamarine
May 3, 2023
Solved

how to view the current password of particular user?

  • May 3, 2023
  • 3 replies
  • 1285 views

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 */});

 

 

Best answer by PEHOWE

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,

 

3 replies

19-Tanzanite
May 3, 2023

Hi @Hariharasuthan 

 

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

17-Peridot
May 3, 2023

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

PEHOWE17-PeridotAnswer
17-Peridot
May 4, 2023

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,