How to get value from password field.
- 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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2023 07:47 AM - edited ‎03-18-2023 11:37 AM
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2023 09:06 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2023 11:52 AM
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2023 11:31 AM
@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