We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Sav4Sav userimport failing

jralexander137
New Contributor II
New Contributor II

Hi. We are trying to use the sav4sav connection to perform a userImport and update some CP to a value using preprocessor. Here are the current connectionJson and userImportJson:

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Accept": "application/json"
},
"authError": [
"InvalidAuthenticationToken"
],
"url": "https://XXXXX.saviyntcloud.com/ECM/api/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"SVC\",\"password\":\"XXXXX\"}",
"errorPath": "error.code",
"maxRefreshTryCount": 2,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer abcd",
"retryFailureStatusCode": [
401,
null
]
}
}
}

 

{
"call": [
{
"connection": "userAuth",
"url": "https://XXXXX.saviyntcloud.com/ECM/api/v5/getUser",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpParams": "",
"httpContentType": "application/json",
"colsToPropsMap": {
"username": "username~#~char"
},
"userResponsePath": "userdetails",
"listField":"userdetails",
"successResponses": {
"statusCode": [200, 201]
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 10000,
"totalCountPath": "totalcount"
}
},
"errorCode": "400",
"errorCodePath": "errorCode"
}
]
}

 

I am seeing a couple errors in the log snip below:

"2024-01-22T17:30:56.187+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","calling getUsersData method to hit Import User API"
"2024-01-22T17:30:56.187+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","Inside getUsersData"
"2024-01-22T17:30:56.187+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","connection: null"
"2024-01-22T17:30:56.212+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","ERROR","Error in getUsersData: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String#<init>."
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4","","Cannot resolve which method to invoke for [null] due to overlapping prototypes between:"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4",""," [class [B]"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4",""," [class [C]"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4",""," [class java.lang.String]"
"2024-01-22T17:30:56.212+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","Error in getUsersData: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String#<init>."
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4","","Cannot resolve which method to invoke for [null] due to overlapping prototypes between:"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4",""," [class [B]"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4",""," [class [C]"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4",""," [class java.lang.String]"
"2024-01-22T17:30:56.213+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","Exit getUsersData"
"2024-01-22T17:30:56.213+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","processing usersData size:: 0"
"2024-01-22T17:30:56.213+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","Start Process Users"
"2024-01-22T17:30:56.213+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","ERROR","Error in processUsers :"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4","","java.lang.NullPointerException: Cannot invoke method containsKey() on null object at com.saviynt.provisoning.rest.RestProvisioningService.processUsers(RestProvisioningService.groovy:2989) at com.saviynt.provisoning.rest.RestProvisioningService.importUsers(RestProvisioningService.groovy:2957) at com.saviynt.ecm.integration.ExternalConnectionCallService.importUserUsingExternalConnection(ExternalConnectionCallService.groovy:1124) at UserImportJob.execute(UserImportJob.groovy:108) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"2024-01-22T17:30:56.213+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","Error in processUsers :"
"2024-01-22T17:30:56.675+00:00","ecm-worker","","null-qnth4","","java.lang.NullPointerException: Cannot invoke method containsKey() on null object at com.saviynt.provisoning.rest.RestProvisioningService.processUsers(RestProvisioningService.groovy:2989) at com.saviynt.provisoning.rest.RestProvisioningService.importUsers(RestProvisioningService.groovy:2957) at com.saviynt.ecm.integration.ExternalConnectionCallService.importUserUsingExternalConnection(ExternalConnectionCallService.groovy:1124) at UserImportJob.execute(UserImportJob.groovy:108) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"2024-01-22T17:30:56.213+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-1-qnth4","DEBUG","End Process Users"

 

Not sure what exactly the problem is. I am able to pull a token and users via postman using these endpoints and creds. It looks like maybe the token isn't being passed properly? Hence this portion in the logs: ,"DEBUG","connection: null" therefore causing no records to be pulled thus generaitng the other errors. Am I on the right track? 

 

I've looked through the sav4sav and rest developers documentation and neither really contain any info on crafting a userImportJson config. My connection JSON looks fine, but I do not see an explicit 200 repsonse from the logs. Do I need some other value besides "Bearer abcd" in the connection json? If so, what should go there? Some token from within saviynt?

 

I can provide whatever info frompostman as needed, thanks!

1 REPLY 1

rushikeshvartak
All-Star
All-Star

Refer Documentation : https://docs.saviyntcloud.com/bundle/Saviynt-REST-based-Guide/page/Content/Understanding-Integration...  


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