Why admin can't see user password

Khiem
Kilo Contributor

I set field in table is password(1 way encripted) but after create record,admin can't view this password.How can I make admin view this ? pls help me!find_real_file.png

1 ACCEPTED SOLUTION

Hi,

If your field type is of password2 then you can decrypt with the below code,

var Encrypter = new GlideEncrypter();   
var encrypted = current.<your_field name> ;
var decrypted = Encrypter.decrypt(encrypted);    
gs.addInfoMessage("encrypted password..   " + encrypted);   
gs.addInfoMessage("decrypted password..   " + decrypted);


View solution in original post

9 REPLIES 9

lukasrudaitis
Tera Expert

I believe it is made this way avoid possible security breaches. Whenever you enter and save the password for user it won't be visible anymore.

You can just set the new password if needed.

Thank you. May I use another way to get password and display this? ex: Use business role to get password,...

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Khiem,

No user can see the password even admin. That is how ServiceNow interprets the password field.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Thank you. But can I use business rules to get the password ?