How to get value from password field.

Community Alums
Not applicable

Hi folks,

How can we retrieve value in the password field. Can we achieve this using scripting ?

5 REPLIES 5

Rahul RJ
Giga Sage
Giga Sage

@Community Alums  It is not possible to get the exact value from the Password (1 Way Encrypted) field. Password (2-Way Encrypted) field value can be encrypted.  You can refer to this document which will help you.

 

For the password 2 field type, you can refer doc 1 .link

2 encrypt a password in the scoped application

Please mark the answer correct/helpful based on Impact.

Regards,

Rahul 

Community Alums
Not applicable

Hi @Rahul RJ ,

I’ve gone through this already, but getDecryptedValue() method is only for global apps I need to decrypt scoped app.

thanks for replying.

getDecryptedValue is actually the way to go in scoped applications. Some fields are protected however and there is no way to get around this.

The only way that will work in case the field is actually protected (which is the case for example for discovery credentials), please create a global script include which decrypt the password in the global scope.

More details (with full code example):
https://www.servicenow.com/community/developer-forum/getting-the-cross-scope-access-policy-error-whi...

Rahul RJ
Giga Sage
Giga Sage

@Community Alums You may find this link will be helpful for you.

 

You can create script include in the global scope and perform operation  and get value in application scope,

 

Please mark the answer correct/helpful based on Impact.

Regards,

RJ