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

Sav4SAV import json to update Saviynt custom property

jalaja88n
New Contributor
New Contributor

Hi Team,

 The import json that I have in the SAV4SAV connection does not seem to work. Can you provide some inputs as to how to get the import json working for the SAV4SAV connection:

{
  "call": [
    {
      "connection": "userAuth",
      "url": "https://dev.saviyntcloud.com/ECM/api/v5/getUser" ,
      "httpMethod": "POST",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "contentType": "application/json"
      },
      "httpParams": "",
      "httpContentType": "application/json",
      "colsToPropsMap": {
        "username": "username~#~char"
      },
      "userResponsePath": "userdetails",
      "pagination": {
        "offset": {
          "offsetParam": "offset",
          "batchParam": "max",
          "batchSize": 10000,
          "totalCountPath": "completeResponseMap.total"
        }},
        "errorCode": "400",
        "errorCodePath": "errorCode"
      }

  ]
}


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

 

ERRORS:

 

"2024-01-19T22:22:45.846+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","calling getUsersData method to hit Import User API"
"2024-01-19T22:22:45.846+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","Inside getUsersData"
"2024-01-19T22:22:45.846+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","connection: null"
"2024-01-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","ERROR","Error in getUsersData: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String#<init>."
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","Cannot resolve which method to invoke for [null] due to overlapping prototypes between:"
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","  [class [B]"
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","  [class [C]"
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","  [class java.lang.String]"
"2024-01-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","Error in getUsersData: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String#<init>."
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","Cannot resolve which method to invoke for [null] due to overlapping prototypes between:"
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","  [class [B]"
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","  [class [C]"
"2024-01-19T22:22:45.989+00:00","ecm-worker","","null-qnth4","","  [class java.lang.String]"
"2024-01-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","Exit getUsersData"
"2024-01-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","processing usersData size:: 0"
"2024-01-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","Start Process Users"
"2024-01-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","ERROR","Error in processUsers :"
"2024-01-19T22:22:45.989+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-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","Error in processUsers :"
"2024-01-19T22:22:45.989+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-19T22:22:45.871+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-qnth4","DEBUG","End Process Users"

[This message has been edited by moderator to disable url hyperlink]

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Did you tried api using service account in postman


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

We are seeing data returned via postman. Here is the beginning of the response: 

{
    "msg": "Successful",
    "displaycount": "50",
    "totalcount": "44440",
    "userdetails": [
        {
            "country": "India",
            "firstname": "zAkshara",
 
The error occurs when we run the user import  job. Doesn't look like its pulling any objects when run which looks to be why the error is ocurring. Not sure why we're getting results in postman but not when run via the connector.

Refer https://forums.saviynt.com/t5/identity-governance/sav4sav-rest-user-import-and-modifyuserdatajson-im...


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

prafullgoyal
Saviynt Employee
Saviynt Employee

Hi @jalaja88n ,

The examples of JSON are shown below. Make any necessary changes to "XX" .

----------------------connectionJSON--------------------

{
    "authentications": {
        "userAuth": {
            "authType": "oauth2",
            "httpHeaders": {
                "Content-Type": "application/json"
            },
            "authError": [
                "USER_AUTHENTICATION_FAILED",
                "PARTNER_AUTHENTICATION_FAILED",
                "AuthenticationFailed"
            ],
            "url": "XXXXXX",
            "httpMethod": "POST",
            "httpContentType": "application/json",
            "errorPath": "errorCode",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "accessToken",
            "tokenType": "Bearer",
            "authHeaderName": "Authorization",
            "accessToken": "bearer abcd",
            "httpParams": "{\"username\": \"XXXX\",\"password\": \"XXXX\"}",
            "retryFailureStatusCode": [
                401
            ]
        }
    }
}

 

--------------------------Import User JSON ---------------------------------

{
"type": "multiCall",
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "XXXXX/ECM/api/v5/FetchRuntimeControlsData",
"httpParams": "{\"analyticsid\": \"XX\"}",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"userResponsePath": "result",
"colsToPropsMap": {
"username": "IDENTITYID~#~char",
"systemusername": "LOGONNAME~#~char",
"email": "EMAIL~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 50,
"totalCountPath": "completeResponseMap.total"
}
}
},
{
"name": "call2",
"connection": "userAuth",
"url": "XXXX/ECM/api/v5/FetchRuntimeControlsData",
"httpParams": "{\"analyticsid\": \"XX\"}",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"userResponsePath": "result",
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty38": "CP38~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 50,
"totalCountPath": "completeResponseMap.total"
}
}
}
]
}

 

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