How to get value from password field.

Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2023 01:42 AM
Hi folks,
How can we retrieve value in the password field. Can we achieve this using scripting ?
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 11:20 PM
var gr = new GlideRecord('<table which holds the password field>');
gr.get('<sys_id of the record which has the passoword field>');
var Encrypter = new GlideEncrypter();
var encrypted = gr.<Name of the password field>;
var decrypted = Encrypter.decrypt(encrypted);
gs.print("encrypted.. " + encrypted);
gs.print("decrypted.. " + decrypted);