Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Service now group recon not saving entitlements in Saviynt

Karankumar
New Contributor
New Contributor

Hi,

Service Now group recon is able to get the successful response (GET response) from the group endpoint   but not able to save the entitlements in Saviynt.

"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,091 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - INFO: Entitlement_value is null, record not saved.\n","stream":"stdout","time":"2023-09-17T16:54:17.091442489Z"}"

Entitlement_value mapping is already present in the group json.

 

 

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

Can you share json & steps to replicate


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<HOSTNAME>/api/x_thffl_cmdb_api/users/all?limit=1&source=Workday",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "user_name~#~char",
"displayname": "display_name~#~char",
"status": "active~#~char"
}
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Group": {
"entTypeOrder": 0,
"entTypeLabels": {},
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://<HOSTNAME>/api/x_thffl_cmdb_api/groups/all",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"status": "active~#~char"
}
}
},
"entMappings": {
"Group": {
"listPath": "parent",
"idPath": "value",
"idColumn": "entitlementID",
"mappingTypes": [
"ENTMAP"
]
}
}
}
}
},
"acctEntParams": {}
}

Steps to replicate:

Run the Service Now Access Recon Job - Import (Application Data Import (Single Threaded) )  .

Logs : 

responseText:{\"result\":{\"count\":10.0,\"records\":[{\"id\":\"3b785b771b68f4500262a648624bcb86\",\"name\":\" ProSurv3 Approvers\"},{\"id\":\"e4f694421bc22010b309ea807e4bcbee\",\"name\":\"7873 Sales \u0026 Compensation Tech Resource Managers\"},{\"id\":\"1e7897771b68f4500262a648624bcb3b\",\"name\":\"A Team Approvers\"},{\"id\":\"89e1d7481b396010d5e19713b24bcbe7\",\"name\":\"AAC Production Support\"},{\"id\":\"a04723351bac7f44b787ea866e4bcbb3\",\"name\":\"AAIA Business Approvers\"},{\"id\":\"01881f771b68f4500262a648624bcbb2\",\"name\":\"AAIA Fulfillers\"},{\"id\":\"864727351bac7f44b787ea866e4bcb30\",\"name\":\"Accounting Batch Processing Business Approvers\"},{\"id\":\"55724b16878f05d43f8a7489cebb3596\",\"name\":\"Accounting Product BSA Support\"},{\"id\":\"127897771b68f4500262a648624bcb42\",\"name\":\"ACIClientConsole Approvers\"},{\"id\":\"244723351bac7f44b787ea866e4bcbb8\",\"name\":\"Activity Records\"}]}}, cookies:[BIGipServerpool_thriventdev=115d42e52b3b9aeb55977ad6bdd41880; httponly; secure; path=/; SameSite=None, JSESSIONID=8BB02CEDD8E4D972213A1156CBB4E5BB; Path=/; HttpOnly; secure; SameSite=None, glide_user=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly; secure; SameSite=None, glide_user_session=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly; secure; SameSite=None, glide_user_route=glide.2c0ea2caad3b7fa0a45dc678dd5557be; Max-Age=2147483647; Expires=Fri, 05-Oct-2091 20:08:24 GMT; Path=/; HttpOnly; secure; SameSite=None, glide_session_store=053C01121BD575108BCDA683B24BCB01; Max-Age=1800; Expires=Sun, 17-Sep-2023 17:24:17 GMT; Path=/; HttpOnly; secure; SameSite=None], statusCode:200]\n","stream":"stdout","time":"2023-09-17T16:54:17.089956898Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,089 [quartzScheduler_Worker-5] DEBUG rest.RestUtilService - pullObjectsByRest - responseStatusCode ::200\n","stream":"stdout","time":"2023-09-17T16:54:17.090007965Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,090 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Entered getResponseHeaders method\n","stream":"stdout","time":"2023-09-17T16:54:17.090416011Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,090 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - responseError : null\n","stream":"stdout","time":"2023-09-17T16:54:17.090484605Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,090 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - isAuthError: false\n","stream":"stdout","time":"2023-09-17T16:54:17.090626873Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,090 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - pullObjectsByRest - responseMap.size : 1\n","stream":"stdout","time":"2023-09-17T16:54:17.090637549Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,090 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - pullObjectsByRest - objectList.size : 2\n","stream":"stdout","time":"2023-09-17T16:54:17.090642597Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,090 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Decrementing connectionParamMap.refreshTryCount : 0\n","stream":"stdout","time":"2023-09-17T16:54:17.090665452Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,091 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Inside importAccessFull:persistEntObjects, pptTypeSep : ~#~\n","stream":"stdout","time":"2023-09-17T16:54:17.09108856Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,091 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - INFO: Entitlement_value is null, record not saved.\n","stream":"stdout","time":"2023-09-17T16:54:17.091442489Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,091 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - secondaryEntTypeImportConfig: null\n","stream":"stdout","time":"2023-09-17T16:54:17.091456205Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,092 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - calling buildEntitlementMappings..\n","stream":"stdout","time":"2023-09-17T16:54:17.092866323Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,092 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Inside RestProvisioiningService.buildEntitlementMappings\n","stream":"stdout","time":"2023-09-17T16:54:17.092879853Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,095 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - called fetchEntitlementTypesFromEntMappingParams..entTypesMap = [Group:96]\n","stream":"stdout","time":"2023-09-17T16:54:17.095230262Z"}"true\n","stream":"stdout","time":"2023-09-17T16:54:17.096817272Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,096 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Inside deleteAccountEntitlementsByEntType \n","stream":"stdout","time":"2023-09-17T16:54:17.096826991Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Deletion of old Account_entitlements1 complete\n","stream":"stdout","time":"2023-09-17T16:54:17.098086441Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - processAccountEntitlementParams complete..\n","stream":"stdout","time":"2023-09-17T16:54:17.098480484Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - calling processEntitlementOwnerParams - memento.entTypesSet : [96]\n","stream":"stdout","time":"2023-09-17T16:54:17.098497733Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Inside processEntitlementOwnerParams*****\n","stream":"stdout","time":"2023-09-17T16:54:17.098502422Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - processEntitlementOwnerParams complete..\n","stream":"stdout","time":"2023-09-17T16:54:17.098505175Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Enter cleanUpDeletedLinks\n","stream":"stdout","time":"2023-09-17T16:54:17.098517435Z"}"
"ecm-worker","2023-09-17T16:54:17.727+00:00","{"log":"2023-09-17 16:54:17,098 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Inside cleanUpEntitlement2ByEntType

[This message has been edited by moderator to remove hyperlink to URL]

I have shared the json and steps

Karankumar
New Contributor
New Contributor

Kindly help

Hi @Karankumar 

As per the response of the Api call , the mapping you have done itself is wrong, so there is no record coming in for entitlement_value and thats why its failing.

After results, there are records and that is in array format , please use this mapping for one record and see if its working fine.

 

"listField": "result.records[0]",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"status": "active~#~char"

 

Thanks

Darshan

"2023-10-03T16:31:49.865+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4","DEBUG","Inside cleanUpEntitlementMapLink "
"2023-10-03T16:31:49.865+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4","DEBUG","EntitlementMap deleteQuery = select emap.ENTITLEMENT_VALUE1KEY, emap.ENTITLEMENT_VALUE2KEY from EntitlementMap emap inner join Entitlement_values ev1 on emap.ENTITLEMENT_VALUE1KEY = ev1.ENTITLEMENT_VALUEKEY inner join Entitlement_values ev2 on emap.ENTITLEMENT_VALUE2KEY = ev2.ENTITLEMENT_VALUEKEY inner join Entitlement_types et1 on ev1.ENTITLEMENTTYPEKEY = et1.ENTITLEMENTTYPEKEY inner join Entitlement_types et2 on ev2.ENTITLEMENTTYPEKEY = et2.ENTITLEMENTTYPEKEY where et1.ENTITLEMENTTYPEKEY in(96) and et2.ENTITLEMENTTYPEKEY in(96) and emap.JOB_ID is not null and emap.JOB_ID <> '35398'"
"2023-10-03T16:31:49.866+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4","DEBUG","Inside cleanUpEntMappingInfoField "
"2023-10-03T16:31:49.866+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4","DEBUG","Entitlements Mapping InfoField deleteQuery = update entitlement_values ev inner join entitlement_types et on ev.ENTITLEMENTTYPEKEY = et.ENTITLEMENTTYPEKEY set entitlementMappingJson = null where et.ENDPOINTKEY = 86"
"2023-10-03T16:31:49.895+00:00","ecm-worker","","","","03-Oct-2023 16:31:49.867 INFO [quartzScheduler_Worker-4] groovy.sql.Sql.commit Commit operation not supported when using datasets unless using withTransaction or cacheConnection - attempt to commit ignored"
"2023-10-03T16:31:49.877+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-4","DEBUG","Writing job history to import logs."
"2023-10-03T16:31:49.877+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-4","DEBUG","Number of log entries to be written : 6"
"2023-10-03T16:31:49.884+00:00","ecm-worker","integration.ExternalConnectionCallService","quartzScheduler_Worker-4","DEBUG","END INVOKING EXTERNAL CONNECTION"
"2023-10-03T16:31:49.884+00:00","ecm-worker","jobs.SapImportJob","quartzScheduler_Worker-4","DEBUG","FINISH externalConnectionCallService"
"2023-10-03T16:31:49.891+00:00","ecm-worker","jobs.SapImportJob","quartzScheduler_Worker-4","DEBUG","Setting the value of import status"
"2023-10-03T16:31:49.891+00:00","ecm-worker","jobs.SapImportJob","quartzScheduler_Worker-4","DEBUG","Import status :: Failure"
"2023-10-03T16:31:49.891+00:00","ecm-worker","services.EmailerService","quartzScheduler_Worker-4","DEBUG","Sending Import Failure Notification Email"
"2023-10-03T16:31:49.891+00:00","ecm-worker","services.EmailerService","quartzScheduler_Worker-4","DEBUG","Email Template not found or is not configured"
"2023-10-03T16:31:49.891+00:00","ecm-worker","services.EmailerService","quartzScheduler_Worker-4","DEBUG","End sending Import Notification Email"
"2023-10-03T16:31:49.891+00:00","ecm-worker","jobs.SapImportJob","quartzScheduler_Worker-4","DEBUG","END SapImportJob"
"2023-10-03T16:31:49.068+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-4","DEBUG","called executeGetRequestWithHeaders for api..."
"2023-10-03T16:31:49.068+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-4","DEBUG","after calling executeRequestWithHeaders for api..."
"2023-10-03T16:31:49.068+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-4","DEBUG","called api..."
"2023-10-03T16:31:49.068+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-4","DEBUG","timeout validated for api..."
"2023-10-03T16:31:49.068+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-4","DEBUG","got response for api..."
"2023-10-03T16:31:49.068+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-4","DEBUG","Got showLogs = true"
"2023-10-03T16:31:49.069+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4","DEBUG","Got Webservice API Response: [headers:[Server: snow_adc, Date: Tue, 03 Oct 2023 16:31:49 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Connection: keep-alive, Set-Cookie=******/; SameSite=None, Set-Cookie=******/; HttpOnly; secure; SameSite=None, Server-Timing: sem_wait;dur=0, sesh_wait;dur=0, Set-Cookie=******/; HttpOnly; secure; SameSite=None, Set-Cookie=******/; HttpOnly; secure; SameSite=None, Set-Cookie=******/; HttpOnly; secure; SameSite=None, Set-Cookie=******/; secure; SameSite=None, X-Is-Logged-In: true, X-Transaction-ID: 7f70a3571bda, Set-Cookie=******/; HttpOnly; secure; SameSite=None, X-RateLimit-Rule: be3062f91bfd70148bcda683b24bcb8f, X-RateLimit-Limit: 500, X-RateLimit-Reset: 1696352400, X-Content-Type-Options: nosniff, Pragma: no-store,no-cache, Cache-Control: no-cache,no-store,must-revalidate,max-age=-1, Expires: 0, Strict-Transport-Security: max-age=63072000; includeSubDomains], responseText:{"result":{"count":1.0,"records":[{"id":"3b785b771b68f4500262a648624bcb86","name":" ProSurv3 Approvers"}]}},

I am also seeing below exception in Service Now account recon:

DEBUG","Inside importAccountsFull:persistAccounts, pptTypeSep : ~#~"
"2023-10-03T17:25:41.895+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-8","ERROR","Exception in persistAccounts:"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","","","java.lang.NullPointerException"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at java.lang.String.contains(String.java:2133)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService.persistAccounts(RestProvisioningService.groovy:4910)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService$_processAccounts_closure28_closure106.doCall(RestProvisioningService.groovy:4155)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService$_processAccounts_closure28.doCall(RestProvisioningService.groovy:4153)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccounts(RestProvisioningService.groovy:4152)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFinal(RestProvisioningService.groovy:1659)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFullBySequentialAndIterative(RestProvisioningService.groovy:1623)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService.importAccountsFull(RestProvisioningService.groovy:1451)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.provisoning.rest.RestProvisioningService.doImport(RestProvisioningService.groovy:137)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at com.saviynt.ecm.integration.ExternalConnectionCallService.invokeExternalMethod(ExternalConnectionCallService.groovy:230)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at SapImportJob.execute(SapImportJob.groovy:109)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at org.quartz.core.JobRunShell.run(JobRunShell.java:199)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","","",""," at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"2023-10-03T17:25:41.895+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-8","ERROR","Invalid record not processed : [count:10.0, records:[[id:05c0b15597d93150fac91b34a253af6d, display_name:A Adam Saleh (TS84403), user_name:TS84403, email:aadam.saleh@<hostname>.com], [id:40c68c141b2ca410b309ea807e4bcbbb, display_name:A'Leesha Truelove (TS75890), user_name:TS75890, email:aleesha.truelove@<hostname>.com], [id:7528ab98dbfbb0d099f49c46b9961997, display_name:Aakansha Negi (TS79257), user_name:TS79257, email:aakansha.negi@<hostname>.com], [id:fff653db1ba320100881404fdc4bcb30, display_name:Aaron Abraham (TS77372), user_name:TS77372, email:aaron@cascadiainsurance.com], [id:74e993a5472dc910a0790272e36d4324, display_name:Aaron Beardsley (TS79886), user_name:TS79886, email:aaron.beardsley@<hostname>.com], [id:3ad719ec870939904b7577b7cebb3511, display_name:Aaron Bowser (TS84324), user_name:TS84324, email:aaron.bowser@<hostname>.com], [id:e0cbbe401b168814b309ea807e4bcbd5, display_name:Aaron Cameron (TS72967), user_name:TS72967, email:aaron.cameron@<hostname>.com], [id:959c40ec1b693380b309ea807e4bcbe9, display_name:Aaron Christian (TS58410), user_name:TS58410, email:aaron.christian@<hostname>.com], [id:569c1c821b98b4500262a648624bcbd4, display_name:Aaron Christiansen (TS77709), user_name:TS77709, email:aaron.christiansen@<hostname>.com], [id:fdedc9531bf590100881404fdc4bcb47, display_name:Aaron Christopher (TS74417), user_name:TS74417, email:aaron.christopher@<hostname>.com]]]"
"2023-10-03T17:25:40.618+00:00","ecm-worker","services.JobManagementGuardRailService","quartzScheduler_Worker-8","DEBUG","Query to get current executing Job : select job_name,trigger_name,entry_id,fired_time,trigger_group from qrtz_fired_triggers"

Hi @Karankumar 

Its not very clear what you want to communicate... There is some issue with Account import as well? , with the group import after using the suggested json did it work if not what did you find out and whats it saying, just pasting few log lines will not help

 

Thanks

Darshan

Hi @Darshanjain ,

I am seeing issue with both access and account recon. I tried the approach you suggested for one entitlement and it did not work. I have shared the logs for the same. 

I also see similar issue with account recon; where its able to get the data from ServiceNow but not able to write the data in Saviynt.

Please let me know if you need any more information.

Kindly help

Thanks