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

Account Import with Rest Connector returning Array of String

bs
New Contributor II
New Contributor II

I tried searching through the forums for a similar issue but couldn't find anything relevant.

I have a system that returns a list of account names in an array. I want to pass this into a second call to get detailed information about the accounts. Sadly, there is no endpoint where I can get the full list of information in one request.

An example response from the API is as follows:

Call1

 

{
  "data": {
    "values": [
      "foo",
      "bar",
      "baz"
    ]
  }
}

 

Call2

 

{
  "data": {
    "id": "1234",
    "name": "foo",
    "created": "2024-02-01T00:00:00.00000000Z",
    "disabled": false
  }
}

 

I've tried processing this with the following JSON configuration to no avail:

 

{
  "accountParams": {
    "connection": "auth",
    "processingType": "SequentialAndIterative",
    "call": {
      "call1": {
        "callOrder": 0,
        "listField": "data.values",
        "keyField": "accountID",
        "http": {
          "url": "https://the.endpoint.com/users",
          "httpMethod": "GET",
          "httpContentType": "application/json",
          "httpHeaders": {}
        },
        "colsToPropsMap": { "accountID": "~#~char", "name": "~#~char" }
      },
      "call2": {
        "callOrder": 1,
        "keyField": "accountID",
        "nextApiKeyField": "accountID",
        "http": {
          "url": "https://the.endpoint.com/users/${accountID}",
          "httpMethod": "GET",
          "httpContentType": "application/json",
          "httpHeaders": {}
        },
        "inputParams": {
          "dependentCall": true
        },
        "colsToPropsMap": {
          "accountID": "data.id~#~char",
          "name": "data.name~#~char",
          "createdon": "data.created~#~date",
          "status": "data.disabled~#~bool",
          "displayName": "data.name~#~char"
        }
      }
    }
  }
}

 

Running this returns log entries like the following for each of the items in Call1:

 

INFO: Account Name is null, record not saved.
Exception in RestUtil.getAt : groovy.lang.MissingPropertyException: No such property: for class: java.lang.String
Possible solutions: class, bytes, empty

 

I have showLogs set in the connection and I do see a successful response with the data from Call1 in the logs. I am guessing that there's some special syntax needed for colsToPropsMap when the field is just a string, but I can't find a relevant example in any of the documentation.

 

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

This is not supported its similar use case like crowdstrike application 

https://ideas.saviynt.com/ideas/EIC-I-5499 

Refer similar https://forums.saviynt.com/t5/identity-governance/rest-api-crowdstrike/m-p/74287/emcs_t/S2h8ZW1haWx8...

 


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

bs
New Contributor II
New Contributor II

Hmm that seems a little different then what you've linked. I don't need to post with a request body for the second call. The URL parameter substitution via dependentCall will work in my case. Unless just processing the array of string is what's not supported...then yes I'm in the same boat.

Its same use case 


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

bs
New Contributor II
New Contributor II

Thanks. In that case, I'll probably just make a proxy layer to translate the response into a format Saviynt can understand and keep the connection JSON configuration simple.

bs
New Contributor II
New Contributor II

@sb  can you help clarify your "currently not supported comment" in the issue @rushikeshvartak  linked above

harsht
Saviynt Employee
Saviynt Employee

Here is a sample with multi calls for Account import:

{
"accountParams": {
"connection": "acctAuth",
"statusAndThresholdConfig": {
"inactivateAccountsNotInFile": false
},
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://abc.com/users",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "ENABLED",
"inactive": "DISABLED"
},
"colsToPropsMap": {
"accountID": "name~#~char",
"name": "name~#~char"
}
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "https://abc.com/users/${accountName}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "",
"keyField": "accountID",
"nextApiKeyField": "accountID",
"colsToPropsMap": {
"accountID": "name~#~char",
"name": "name~#~char",
"status": "status~#~char",
"customproperty4": "email~#~char",
"Privileged": "admin~#~char"
}
}
}
}
}