The CreatorCon Call for Content is officially open! Get started here.

Anyone know the replacement for GlideEncryper's "reencryptParamForAutomation" method?

DrewW
Mega Sage

Anyone know the replacement for GlideEncryper's "reencryptParamForAutomation" method since its being removed?

 

I found a reference to 

SNC.ParameterEncrypter.encrypt(pw)
but I got an error that SNC is not defined, probably because its a scoped app.
 
I would rather not be sending passwords to the MID server in clear text for my custom automations.
 
2 ACCEPTED SOLUTIONS

Amit Verma
Kilo Patron
Kilo Patron

Hi @DrewW 

 

You can try the approach suggested in the below post via Automation API. I tested via Background Script and it is available in global as well as in scoped app.

https://www.servicenow.com/community/now-platform-forum/powershell-activity-encrypted-password/m-p/1...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

Thanks I missed that one. 

 

So this is the replacement for GlideEncryper's "reencryptParamForAutomation" method

 

var sncPW = new global.ScopedEncrypter().decrypt(<PASSWORD2 FIELD VALUE>);
var automation_api = new sn_automation.AutomationAPI();
var pwToPassToTheMIDServer = "" + automation_api.encrypt(sncPW);

 

 

 

Would be nice if SN would add a method to the ScopedEncrypter script include.

View solution in original post

2 REPLIES 2

Amit Verma
Kilo Patron
Kilo Patron

Hi @DrewW 

 

You can try the approach suggested in the below post via Automation API. I tested via Background Script and it is available in global as well as in scoped app.

https://www.servicenow.com/community/now-platform-forum/powershell-activity-encrypted-password/m-p/1...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Thanks I missed that one. 

 

So this is the replacement for GlideEncryper's "reencryptParamForAutomation" method

 

var sncPW = new global.ScopedEncrypter().decrypt(<PASSWORD2 FIELD VALUE>);
var automation_api = new sn_automation.AutomationAPI();
var pwToPassToTheMIDServer = "" + automation_api.encrypt(sncPW);

 

 

 

Would be nice if SN would add a method to the ScopedEncrypter script include.