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 Account Import - Not able to correlate accounts

Karankumar
New Contributor
New Contributor

Hi All,

I am doing account import from Service Now.  Saviynt is able to get response from the Service Now but post that it's not able to corelate any users. Import job is showing as successful.

Below exception is showing up in logs:

"rest.RestUtilService","quartzScheduler_Worker-7","DEBUG","pullObjectsByRest - responseStatusCode ::200"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","Entered getResponseHeaders method"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","responseError : null"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","isAuthError: false"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","pullObjectsByRest - responseMap.size : 1"
"rest.RestUtilService","quartzScheduler_Worker-7","DEBUG","Exception in RestUtil.getAt : java.lang.ArrayIndexOutOfBoundsException"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","pullObjectsByRest - objectList.size : null"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","Inside importAccountsFull:persistAccounts, pptTypeSep : ~#~"
"services.ImportUtilityService","quartzScheduler_Worker-7","DEBUG","isImportSuccess: true"
"services.ImportUtilityService","quartzScheduler_Worker-7","DEBUG","Entered markStatusBasedOnThreshold"
"services.ImportUtilityService","quartzScheduler_Worker-7","DEBUG","statusAndThresholdConfig is empty"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","Mapping Users to accounts."
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","Associating Users and Accounts"
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","Orphan Accounts- 0"
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","Rule: (users.employeeid) = accounts.name"
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","sql = "
"","",""," SELECT USERS.USERKEY AS USERKEY, ACCOUNTS.ACCOUNTKEY AS ACCOUNTKEY FROM ACCOUNTS ACCOUNTS"
"","",""," LEFT JOIN USER_ACCOUNTS UA ON ACCOUNTS.ACCOUNTKEY = UA.ACCOUNTKEY"
"","",""," LEFT JOIN USERS USERS ON "
"","",""," (users.employeeid) = accounts.name "
"","",""," WHERE ACCOUNTS.ENDPOINTKEY = 86 AND ACCOUNTS.STATUS IN ('Active','1','Manually Provisioned')"
"","",""," AND ACCOUNTS.ACCOUNTKEY IS NOT NULL AND UA.ACCOUNTKEY IS NULL"
"","",""," AND ACCOUNTS.NAME IS NOT NULL AND USERS.USERNAME IS NOT NULL"
"","","",""
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","Total accounts to be correlated = 0"
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","User-accounts correlated: 0"
"saviynt.ImportExternalDbService","quartzScheduler_Worker-7","DEBUG","Orphan Accounts remaining- 0"
"rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","Mapping of Users to Accounts is Completed. "
"rest.RestUtilService","quartzScheduler_Worker-7","DEBUG","Writing job history to import logs."
"rest.RestUtilService","quartzScheduler_Worker-7","DEBUG","Number of log entries to be written : 2"
"integration.ExternalConnectionCallService","quartzScheduler_Worker-7","DEBUG","END INVOKING EXTERNAL CONNECTION"
"jobs.SapImportJob","quartzScheduler_Worker-7","DEBUG","FINISH externalConnectionCallService"
"jobs.SapImportJob","quartzScheduler_Worker-7","DEBUG","Setting the value of import status"
"jobs.SapImportJob","quartzScheduler_Worker-7","DEBUG","Import status :: Success"

13 REPLIES 13

Saathvik
All-Star
All-Star

Looking at logs though it is getting response but it didn't find any accounts 

objectList.size : null

Total accounts to be correlated = 0

User-accounts correlated: 0

Orphan Accounts remaining- 0

Did you see any accounts getting imported to respective endpoint?

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

No accounts were imported. But I can see the data from the Service Now in the logs

Can you share the full logs because based on the log snippet you have shared I can only see it didn't find any accounts


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Karankumar
New Contributor
New Contributor

2023-10-05T19:43:58.645+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7","DEBUG","getHttpClient - HttpClientBuilder.create().build() called."
"2023-10-05T19:43:59.027+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7","DEBUG","called executeGetRequestWithHeaders for api..."
"2023-10-05T19:43:59.027+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7","DEBUG","after calling executeRequestWithHeaders for api..."
"2023-10-05T19:43:59.027+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7","DEBUG","called api..."
"2023-10-05T19:43:59.027+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7","DEBUG","timeout validated for api..."
"2023-10-05T19:43:59.027+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7","DEBUG","got response for api..."
"2023-10-05T19:43:59.027+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-7","DEBUG","Got showLogs = true"
"2023-10-05T19:43:59.027+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","Got Webservice API Response: [headers:[Server: snow_adc, Date: Thu, 05 Oct 2023 19:43:58 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: 92af1a4cd323, Set-Cookie=******/; HttpOnly; secure; SameSite=None, 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":10.0,"records":[{"id":"05c0b15597d93150fac91b34a253af6d","display_name":"A Adam Saleh (TS84403)","user_name":"TST84403","email":"xxxxxxx@<hostname>.com"},{"id":"40c68c141b2ca410b309ea807e4bcbbb","display_name":"A'Leesha T (TS75890)","user_name":"TST75890","email":"ale.t@<hostname>.com"},{"id":"7528ab98dbfbb0d099f49c46b9961997","display_name":"Aak Ne (TS79257)","user_name":"TST79257","email":"a.n@<hostname>.com"},{"id":"fff653db1ba320100881404fdc4bcb30","display_name":"test Abraham (TS77372)","user_name":"TST77372","email":"test@<hostname>.com"},{"id":"74e993a5472dc910a0790272e36d4324","display_name":"test B (TS79886)","user_name":"TST79886","email":"test.b@<hostname>.com"},{"id":"3ad719ec870939904b7577b7cebb3511","display_name":"test Bowser (TS84324)","user_name":"TST84324","email":"test.bowser@<hostname>.com"},{"id":"e0cbbe401b168814b309ea807e4bcbd5","display_name":"test Ca (TS72967)","user_name":"TST72967","email":"test.ca@<hostname>.com"},{"id":"959c40ec1b693380b309ea807e4bcbe9","display_name":"test Ch (TS58410)","user_name":"TST58410","email":"test.ch@<hostname>.com"},{"id":"569c1c821b98b4500262a648624bcbd4","display_name":"test Ch (TS77709)","user_name":"TST77709","email":"test.ch@<hostname>.com"},{"id":"fdedc9531bf590100881404fdc4bcb47","display_name":"test Ch (TS74417)","user_name":"TST74417","email":"test.c@<hostname>.com"}]}}, cookies:[BIGipServerpool_<hostname>dev=115d42e52b3b9aeb55977ad6bdd41880; httponly; secure; path=/; SameSite=None, JSESSIONID=45B639087EF9B29E7937258749569D1D; 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=Tue, 23-Oct-2091 22:58:05 GMT; Path=/; HttpOnly; secure; SameSite=None, glide_node_id_for_js=2ed6416d5eceadeaa78173960eba70c8990de746534b47b03929de9496975cb0; Path=/; secure; SameSite=None, glide_session_store=5EAF1A4C1BB1F1508BCDA683B24BCBD2; Max-Age=1800; Expires=Thu, 05-Oct-2023 20:13:58 GMT; Path=/; HttpOnly; secure; SameSite=None], statusCode:200]"
"2023-10-05T19:43:59.027+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-7","DEBUG","pullObjectsByRest - responseStatusCode ::200"
"2023-10-05T19:43:59.028+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7","DEBUG","Entered getResponseHeaders method"

These are the logs before that error

[This message has been edited by moderator to mask PII info]

Manu269
All-Star
All-Star

Please share import account json?

Also share Account name rule used?

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<HOSTNAME>.com/api/x_cmdb_api/users/employees",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result.records[]",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"customproperty1": "display_name~#~char",
"customproperty2": "email~#~char",
"name": "user_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>.com/api/x_cmdb_api/groups/all?limit=5000",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result.records",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"status": "active~#~char"
}
}
},
"entMappings": {
"Group": {
"listPath": "parent",
"idPath": "value",
"idColumn": "entitlementID",
"mappingTypes": [
"ENTMAP"
]
}
}
}
}
},
"acctEntParams": {}
}

Karankumar
New Contributor
New Contributor

any updats

Karankumar
New Contributor
New Contributor

@Karankumar : Can you share the sample API response using POSTMAN? Also STATUS_THRESHOLD_CONFIG


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

{
    "result": {
        "count": 2.0,
        "records": [
            {
                "id""05c0b15597d93150fac91b34a253af6d",
                "display_name""A Tester User(AB84403)",
                "user_name""AB84403",
                "email""Test.user1@test.com"
            },
            {
                "id""40c68c141b2ca410b309ea807e4bcbbb",
                "display_name""Test User2(AB75890)",
                "user_name""AB75890",
                "email""test.user2@test.com"
            }
     ]
    }
}

I dont have anything in status_threshold_config

Change the below in accountsParam and see

"listField": "result.records[]" to "listField": "result.records"


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Manu269
All-Star
All-Star

Can you check this :
1. "listField": "result.records[]",
2. "accountID": "id~#~char",
3. Pagination details are missing
4. acctEntParams is not listed

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.