Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Custom Property 31 with script - Entlitlement mapping with account import

wronzitti
New Contributor
New Contributor

Hi,

We're dealing with an issue related to Custom Property 31 and entitlement mapping.

We customized this attribute to concatenate a specific string with the entlitlement value.

We see the script is populating correctly with the values expected, but we're seeing errors in the logs related to JS malformed/expections, that are not allowing to map the account with the entitlements.

This is the importAccountJSON:

 

 

{
  "accountParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountsNotInImportAction": "Suspend",
      "inactivateAccountsNotInFile": false
    },
    "includeExistingInActiveAccounts": "true",
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://dev/finegrain/getAuthWithUserInfo",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "x-apigw-api-id": "81ti0m5k5a",
            "Content-Type": "application/json"
          },
          "httpContentType": "application/json",
          "Accept": "application/json",
          "httpParams": "{\"appName\":\"MYFUNDING\",\"status\":\"ACTIVE\"}",
          "httpMethod": "POST"
        },
        "listField": "responseData",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "sso~#~char",
          "name": "sso~#~char",
          "customproperty1": "email~#~char",
          "customproperty2": "firstname~#~char",
          "customproperty3": "lastname~#~char",
          "customproperty4": "title~#~char",
          "customproperty31": "#CONST#${String output1 = response.roles.collect {it.function+':'+it.appRole+':All:All'}.join('\",\"'); String beg = '{\"Access-Role\":{\"entIds\":[\"'; String end = '\"],\"keyField\":\"entitlement_value\"}}'; String ent = beg + output1 + end; return ent;}~#~char"
        }
      }
    },
    "entitlementParams": {},
    "acctEntParams": {}
  }
}

 

These are the errors we see in logs:

 

2024-10-04T17:49:07-03:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-1-s4pz2-DEBUG-pullObjectsByRest - responseStatusCode ::200
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-s4pz2-DEBUG-Entered getResponseHeaders method
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-s4pz2-DEBUG-responseError : null
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-s4pz2-DEBUG-isAuthError: false
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-s4pz2-DEBUG-pullObjectsByRest - responseMap.size : 4
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-s4pz2-DEBUG-pullObjectsByRest - objectList.size : 26
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-s4pz2-DEBUG-Inside importAccountsFull:persistAccounts, pptTypeSep : ~#~
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-1-s4pz2-DEBUG-Exception in RestUtil.getAt : java.lang.NumberFormatException: For input string: ""'; String end = '""
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-1-s4pz2-DEBUG-Exception in RestUtil.getAt : java.lang.NumberFormatException: For input string: ""'; String end = '""
2024-10-04T17:49:07-03:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-1-s4pz2-DEBUG-Exception in RestUtil.getAt : java.lang.NumberFormatException: For input 

 

This is the API Response:

 

{
    "status": "SUCCESS",
    "httpStatusCode": 200,
    "statusMessage": "REQUEST EXECUTION SUCCESSFUL",
    "responseData": [
        {
            "appName": "MYFUNDING",
            "sso": "502815542",
            "roles": [
                {
                    "statusRole": "ACTIVE",
                    "appRole": "ALM",
                    "function": "Treasury"
                },
                {
                    "statusRole": "ACTIVE",
                    "appRole": "FX Exposure",
                    "function": "Treasury"
                },
                {
                    "statusRole": "ACTIVE",
                    "appRole": "Other",
                    "function": "Treasury"
                },
                {
                    "statusRole": "ACTIVE",
                    "appRole": "Requester",
                    "function": "Business"
                }
            ],
            "firstName": "MySuite",
            "lastName": "User15",
            "title": "Test",
            "email": "test@ge.com",
            "lastUpdatedTime": "03/31/2022 12:07:05"
        },
        {
            "appName": "MYFUNDING",
            "sso": "502815536",
            "roles": [
                {
                    "statusRole": "ACTIVE",
                    "appRole": "Affirmer",
                    "function": "Treasury"
                },
                {
                    "statusRole": "ACTIVE",
                    "appRole": "FO",
                    "function": "Treasury"
                }
            ],
            "firstName": "MySuite",
            "lastName": "USER7",
            "title": "",
            "email": "mysuiteuser7@ge.com",
            "lastUpdatedTime": "03/31/2022 12:11:50"
        }
    }
]

 

Thanks

1 REPLY 1

wronzitti
New Contributor
New Contributor

Adding screenshot and values of the CP31:

wronzitti_0-1728076712797.png

CP31: {"Access-Role":{"entIds":["Treasury:ALM:All:All","Treasury:FX Exposure:All:All","Treasury:Other:All:All","Business:Requester:All:All"],"keyField":"entitlement_value"}}

 

Thanks