IBM Security Verify

 View Only

Attempting to use executeInAccessPolicy from an Access Policy

  • 1.  Attempting to use executeInAccessPolicy from an Access Policy

    Posted Wed August 24, 2022 08:35 AM
    Edited by Wendy Batten Thu August 25, 2022 08:43 AM
    Hi Team,

    I'm looking to access an authentication service policy from an Access Policy using the AuthSvcClient "executeInAccessPolicy" method as described here:

    However, I'm receiving the errors:
    • If I attempt to import the Class: Caused by: org.mozilla.javascript.EvaluatorException: Function importClass must be called with a class; had "[JavaPackage] instead."
    • If I attempt to call the Class directly: Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call property executeInAccessPolicy in object [JavaPackage]. It is not a function, it is "object".
    It appears that the AuthSvcClient Class has not been whitelisted for Access Policies as per here:

    The sample snippet I'm using within an Access Policy script is (noting that the sample includes both import of Class and calling the Class directly):
    var jsonRequest = {
    	"PolicyId": "urn:ibm:security:authentication:asf:testing",
    var response =, JSON.stringify(jsonRequest),"testuser"));
    IDMappingExtUtils.traceString("AuthSvcClient JSON response: " + response);

    So, my questions are:
    1) have I misunderstood the intent of this feature?
    2) if not, is my snippet incorrect?