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
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

 

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

View solution in original post

5 REPLIES 5

Ravi Chandra_K
Kilo Patron
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
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.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Riya Verma
Kilo Sage
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

 

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

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