Unable to retrieve data from the secure store. No record found with secureDataId: XXXXXX (Sys Id)

Rahul938
Tera Contributor

I am getting an error when below OOB script include "WorkdayUtils" method is called from a flow action - 

var newToken = WorkdayUtils.doDecryption(result.access_token);
 
WorkdayUtils.doDecryption = function(accessToken) {
    var secret = accessToken.substring(accessToken.indexOf('[') + 1, accessToken.indexOf(']'));
    var operation2 = new sn_kmf_ns.KMFCryptoOperation("sn_workday_hr_spke.glide_encrypter", "symmetric_unwrapping").withAlgorithm("AES");
    var decryptedToken = gs.base64Decode(operation2.doOperation(String(secret)));
    return decryptedToken;
};
 
Error: Unable to retrieve data from the secure store. No record found with secureDataId: XXXXXX (Sys Id)
 
I have checked the Module Access Policies, looks like that is all setup correctly but not sure why I am getting this error while I am calling this flow action for Workday SOAP Request from Workday HR Spoke. Ideally it should return me the decrypted Access Token but instead getting this error. Please see the Screen Shot of the error message from OOB flow action.
 
Rahul938_0-1729694256597.pngAny Suggestions please?

 

 
Thanks in Advance! 
2 REPLIES 2

takshisan
Kilo Guru

That's strange.
Are the permissions set appropriately?

What about authentication?
User authentication has not been completed.

Or, I felt that I might have a problem with MFA.

Daniel Oderbolz
Kilo Sage

This is a KMF (Key Management Framework) issue. Typically, this can be fixed with a key exchange (see https://www.servicenow.com/docs/bundle/washingtondc-platform-security/page/administer/key-management...).

I would recommend to open a Case with ServiceNow.


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel