- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 08:38 PM
Hi.
There is a field "password" of type Password (2 Way Encrypted) in one table.
How can we decrypt and retrieve the value of the "password" field from outside of ServiceNow using the REST API and Power Shell?
Is it possible?
Can someone please tell me exactly how to do this?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 08:56 PM
Hi,
I don't think using table API you can get that
you would require scripted rest api and decrypt and then send the value in API response
script to decrypt
how to decrypt the password2 (2 way encryption) field in scoped application
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 08:56 PM
Hi,
I don't think using table API you can get that
you would require scripted rest api and decrypt and then send the value in API response
script to decrypt
how to decrypt the password2 (2 way encryption) field in scoped application
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2022 06:13 AM
Did you mistakenly marked other response as correct?
The same details were shared by me as 1st response to your question.
You can only mark 1 response as correct.
Would you mind marking the response based on timely response.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 08:59 PM
Hi
OOTB there is no API available to return the decrypted value of a field.
Instead you have to build a Scripted REST API which does the decryption:
var objEncrypter = new GlideEncrypter();
var strDecrypted = objEncrypter.decrypt('<YOUR ENCRYPTED VALUE>');
Kind regards
Maik