User account password decrypt

Jasleen Kaur3
Tera Contributor

Is there a way by which we can decrypt the password field to extract the password in string format?

1 ACCEPTED SOLUTION

Riya Verma
Kilo Sage

Hi @Jasleen Kaur3 ,

 

Hope you are doing great. 

 

I have faced similar kind of scenario where we need to decrypt the password type field. Please referthe below document. it can help you out :


https://snprotips.com/useful-scripts#1

 

 

View solution in original post

5 REPLIES 5

Ravi Chandra_K
Kilo Patron

Hello @Jasleen Kaur3 

This can be achieved with GlideEncrypter method. (This will not work in Scoped application though).

var Encrypter = new GlideEncrypter();  

var encrypted =current.field_name;var

var decrypted = Encrypter.decrypt(encrypted);  

gs.addInfoMessage("decrypted.. " + decrypted);

 

refer:

https://www.servicenow.com/community/itsm-forum/decrypting-user-password-in-business-rule-or-script/... (this thread suggests changing the password field type to password2)

https://snowunderground.com/blog/2021/9/6/how-to-use-password-properties

please mark the answer as helpful and correct based on Impact!!

 

Kind Regards,

Ravi Chandra.

Mark Roethof
Tera Patron

Hi there,

 

Please define which password fields. Some in ServiceNow, yes possible 🙂 Though for example password field on sys_user... no not possible.

Riya Verma
Kilo Sage

Hi @Jasleen Kaur3 ,

 

Hope you are doing great. 

 

I have faced similar kind of scenario where we need to decrypt the password type field. Please referthe below document. it can help you out :


https://snprotips.com/useful-scripts#1

 

 

Thank you @Riya Verma   for link and solution. It helped me out