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

REST Connector: UserImportJSON - Multiple Calls

dgeorge_
New Contributor II
New Contributor II

We are attempting to make multiple API calls for the userimportJSON. These 2 calls are different from each other and the 2nd call does not require any response data from the first call (e.g. we are not using "multitype" call type).

Below is the JSON we are attempting to work with, this gives us an "Ambiguous method overloading for method java.lang.String#. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class [B] [class [C] [class java.lang.String]" error.

 

{
  "call": [
    {
      "name": "call1",
      "connection": "userAuth",
      "httpMethod": "GET",
      "httpHeaders": {
        "Authorization": "${access_token}"
      },
      "userResponsePath": "",
      "colsToPropsMap": {
        "username": "_fields.Employee~#~string",
        "firstname": "_fields.Name~dot#GivenName~#~string",
        "lastname": "_fields.Name~dot#FamilyName~#~string",
        "email": "_fields.EmployeeWorkEmailAddress~#~string",
        "middlename": "_fields.Name~dot#MiddleName~#~string",
        "systemusername": "_fields.Employee~#~string",
        "departmentname": "_fields.Department~#~string",
        "customproperty5": "_fields.Name~dot#GivenName~#~string",
        "customproperty6": "_fields.StartDate~#~string",
        "customproperty7": "_fields.Department~#~string",
        "customproperty8": "_fields.EmployeeWorkEmailAddress~#~string",
        "customproperty9": "_fields.AdjustedStartDate~#~string",
        "customproperty10": "_fields.Name~dot#PreferredGivenName~#~string",
        "customproperty11": "_fields.Name~dot#MiddleName~#~string",
        "customproperty12": "_fields.RelationshipStatus~#~string",
        "customproperty13": "_fields.Name~dot#PreferredFamilyName~#~string",
        "customproperty14": "_fields.Employee~#~string",
        "customproperty15": "_fields.HROrganization~#~string",
        "customproperty16": "_fields.PLTActorRel~dot#CustomActorFields~#~string",
        "statuskey": "_fields.RelationshipStatus~#~string"
      },
      "statusConfig": {
        "active": ["F1","P1","LP"],
        "inactive": "T"
      }
    },
    {
      "name": "call2",
      "connection": "userAuth",
      "httpMethod": "GET",
      "httpHeaders": {
        "Authorization": "${access_token}"
      },
      "userResponsePath": "",
      "colsToPropsMap": {
        "username": "_fields.Employee~#~string",
        "firstname": "_fields.Name~dot#GivenName~#~string",
        "lastname": "_fields.Name~dot#FamilyName~#~string",
        "email": "_fields.EmployeeWorkEmailAddress~#~string",
        "middlename": "_fields.Name~dot#MiddleName~#~string",
        "systemusername": "_fields.Employee~#~string",
        "departmentname": "_fields.Department~#~string",
        "customproperty5": "_fields.Name~dot#GivenName~#~string",
        "customproperty6": "_fields.StartDate~#~string",
        "customproperty7": "_fields.Department~#~string",
        "customproperty8": "_fields.EmployeeWorkEmailAddress~#~string",
        "customproperty9": "_fields.AdjustedStartDate~#~string",
        "customproperty10": "_fields.Name~dot#PreferredGivenName~#~string",
        "customproperty11": "_fields.Name~dot#MiddleName~#~string",
        "customproperty12": "_fields.RelationshipStatus~#~string",
        "customproperty13": "_fields.Name~dot#PreferredFamilyName~#~string",
        "customproperty14": "_fields.Employee~#~string",
        "customproperty15": "_fields.HROrganization~#~string",
        "customproperty16": "_fields.PLTActorRel~dot#CustomActorFields~#~string",
        "statuskey": "_fields.RelationshipStatus~#~string"
      },
      "statusConfig": {
        "active": ["F1","P1","LP"],
        "inactive": "T"
      }
    }
  ]
}
6 REPLIES 6

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @dgeorge_,

Can you please share the complete postman response for the both the call in the text format, with the postman screenshot as well?
You can use Multicall, also you cannot have mul in the json, also you may try to use datatype using char instead of string.

Thanks

If you find the above response useful, Kindly Mark it as "Accept As Solution".

See attached files, forum2.txt is the response made from call 1 (this is limited to 1 record and all PII has been scrubbed)... This response would include the first employee.

Forum1.txt would be the 2nd response made from the 2nd call (again limited to 1 record)... This response would include the second employee record.

Multicall does not successfully work with the flag "Inactive users not feed" turn on within the userImport job. 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @dgeorge_,
You may try with the below sample, You cannot pass the multiple statuses, you have to decide which status you want to import.You may change the below json and try accordingly.

 

[
   {
      "name":"call1",
      "connection":"userAuth",
      "url":"https://myurl.com/path1/path2",
      "httpMethod":"GET",
      "httpHeaders":{
         "Content-Type":"application/json",
         "Authorization":"${access_token}"
      },
      "userResponsePath":"",
      "colsToPropsMap":{
         "username":"_fields.Employee~#~char",
         "firstname":"_fields.Name~dot#GivenName~#~char",
         "lastname":"_fields.Name~dot#FamilyName~#~char",
         "email":"_fields.EmployeeWorkEmailAddress~#~char",
         "middlename":"_fields.Name~dot#MiddleName~#~char",
         "systemusername":"_fields.Employee~#~char",
         "departmentname":"_fields.Department~#~char",
         "customproperty5":"_fields.Name~dot#GivenName~#~char",
         "customproperty6":"_fields.StartDate~#~char",
         "customproperty7":"_fields.Department~#~char",
         "customproperty8":"_fields.EmployeeWorkEmailAddress~#~char",
         "customproperty9":"_fields.AdjustedStartDate~#~char",
         "customproperty10":"_fields.Name~dot#PreferredGivenName~#~char",
         "customproperty11":"_fields.Name~dot#MiddleName~#~char",
         "customproperty12":"_fields.RelationshipStatus~#~char",
         "customproperty13":"_fields.Name~dot#PreferredFamilyName~#~char",
         "customproperty14":"_fields.Employee~#~char",
         "customproperty15":"_fields.HROrganization~#~char",
         "customproperty16":"_fields.PLTActorRel~dot#CustomActorFields~#~char",
         "statuskey":"_fields.RelationshipStatus~#~char"
      },
      "statusConfig":{
         "active":[
            "F1",
            "P1",
            "LP"
         ],
         "inactive":"T"
      }
   },
   {
      "name":"call2",
      "connection":"userAuth",
      "url":"https://myurl.com/path1/path2",
      "httpMethod":"GET",
      "httpHeaders":{
         "Authorization":"${access_token}"
      },
      "userResponsePath":"",
      "colsToPropsMap":{
         "username":"_fields.Employee~#~char",
         "firstname":"_fields.Name~dot#GivenName~#~char",
         "lastname":"_fields.Name~dot#FamilyName~#~char",
         "email":"_fields.EmployeeWorkEmailAddress~#~char",
         "middlename":"_fields.Name~dot#MiddleName~#~char",
         "systemusername":"_fields.Employee~#~char",
         "departmentname":"_fields.Department~#~char",
         "customproperty5":"_fields.Name~dot#GivenName~#~char",
         "customproperty6":"_fields.StartDate~#~char",
         "customproperty7":"_fields.Department~#~char",
         "customproperty8":"_fields.EmployeeWorkEmailAddress~#~char",
         "customproperty9":"_fields.AdjustedStartDate~#~char",
         "customproperty10":"_fields.Name~dot#PreferredGivenName~#~char",
         "customproperty11":"_fields.Name~dot#MiddleName~#~char",
         "customproperty12":"_fields.RelationshipStatus~#~char",
         "customproperty13":"_fields.Name~dot#PreferredFamilyName~#~char",
         "customproperty14":"_fields.Employee~#~char",
         "customproperty15":"_fields.HROrganization~#~char",
         "customproperty16":"_fields.PLTActorRel~dot#CustomActorFields~#~char",
         "statuskey":"_fields.RelationshipStatus~#~char"
      }
   }
]

 

Also you can try to pass the status config, while setting up the job,
PFA for your ref,

sudeshjaiswal_0-1703733854119.png


For Ref: https://forums.saviynt.com/t5/identity-governance/user-s-status-not-being-made-inactive-when-termina... 


If you find the above response useful, Kindly Mark it as "Accept As Solution".

We get the following error when saving the connector with that json... 

 
Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token at [Source:

Hello @dgeorge_,

Sorry i missed few lines while pasiting the json here,

{
 "type": "multiCall",
  "call": [
   {
      "name":"call1",
      "connection":"userAuth",
      "url":"https://myurl.com/path1/path2",
      "httpMethod":"GET",
      "httpHeaders":{
         "Content-Type":"application/json",
         "Authorization":"${access_token}"
      },
      "userResponsePath":"",
      "colsToPropsMap":{
         "username":"_fields.Employee~#~char",
         "firstname":"_fields.Name~dot#GivenName~#~char",
         "lastname":"_fields.Name~dot#FamilyName~#~char",
         "email":"_fields.EmployeeWorkEmailAddress~#~char",
         "middlename":"_fields.Name~dot#MiddleName~#~char",
         "systemusername":"_fields.Employee~#~char",
         "departmentname":"_fields.Department~#~char",
         "customproperty5":"_fields.Name~dot#GivenName~#~char",
         "customproperty6":"_fields.StartDate~#~char",
         "customproperty7":"_fields.Department~#~char",
         "customproperty8":"_fields.EmployeeWorkEmailAddress~#~char",
         "customproperty9":"_fields.AdjustedStartDate~#~char",
         "customproperty10":"_fields.Name~dot#PreferredGivenName~#~char",
         "customproperty11":"_fields.Name~dot#MiddleName~#~char",
         "customproperty12":"_fields.RelationshipStatus~#~char",
         "customproperty13":"_fields.Name~dot#PreferredFamilyName~#~char",
         "customproperty14":"_fields.Employee~#~char",
         "customproperty15":"_fields.HROrganization~#~char",
         "customproperty16":"_fields.PLTActorRel~dot#CustomActorFields~#~char",
         "statuskey":"_fields.RelationshipStatus~#~char"
      },
      "statusConfig":{
         "active":[
            "F1",
            "P1",
            "LP"
         ],
         "inactive":"T"
      }
   },
   {
      "name":"call2",
      "connection":"userAuth",
      "url":"https://myurl.com/path1/path2",
      "httpMethod":"GET",
      "httpHeaders":{
         "Authorization":"${access_token}"
      },
      "userResponsePath":"",
      "colsToPropsMap":{
         "username":"_fields.Employee~#~char",
         "firstname":"_fields.Name~dot#GivenName~#~char",
         "lastname":"_fields.Name~dot#FamilyName~#~char",
         "email":"_fields.EmployeeWorkEmailAddress~#~char",
         "middlename":"_fields.Name~dot#MiddleName~#~char",
         "systemusername":"_fields.Employee~#~char",
         "departmentname":"_fields.Department~#~char",
         "customproperty5":"_fields.Name~dot#GivenName~#~char",
         "customproperty6":"_fields.StartDate~#~char",
         "customproperty7":"_fields.Department~#~char",
         "customproperty8":"_fields.EmployeeWorkEmailAddress~#~char",
         "customproperty9":"_fields.AdjustedStartDate~#~char",
         "customproperty10":"_fields.Name~dot#PreferredGivenName~#~char",
         "customproperty11":"_fields.Name~dot#MiddleName~#~char",
         "customproperty12":"_fields.RelationshipStatus~#~char",
         "customproperty13":"_fields.Name~dot#PreferredFamilyName~#~char",
         "customproperty14":"_fields.Employee~#~char",
         "customproperty15":"_fields.HROrganization~#~char",
         "customproperty16":"_fields.PLTActorRel~dot#CustomActorFields~#~char",
         "statuskey":"_fields.RelationshipStatus~#~char"
      }
   }
]
}


Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".