Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

REST Connector - ImportAccEntJSON Error

anuragtripathi
New Contributor
New Contributor

Am trying to integrate an app using REST based connector and the api response is as below:

And I have tried below JSON and the statuscode I can see as 200 but am not getting any accounts under Endpoint. I have tried listfield as "data.result", "data", "result" but didnt work at all. When I use "data" in the listfield, I have colsToPropsMap as result.firstname but still no luck. Did anyone tried with this type of API response. Thanks in advance

Part of ImpAccEntJSON:

"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "email~#~char",
"name": "email~#~char",
"displayName": "username~#~char",
"customproperty1": "firstName~#~char",
"customproperty2": "lastName~#~char",
"customproperty6": "status~#~char",
"status": "status~#~char"
},

 

API Response:

{
"statusCode": 200,
"message": {
"code": "success",
"description": "Success!"
},
"data": {
"total": 567,
"totalPage": 1,
"pageNumber": "1",
"pageSize": "1000",
"result": [
{
"username": "",
"email": "",
"firstName": "AbC",
"lastName": "Ab",
"permissions": [
{
"category": "Finance",
"deptName": "MRC",
"roles": [
{
"id": "a5cb5e78-e194-43fb-8835-41c21e51a8a5",
"description": "ReportReader"
}]}}]}}

6 REPLIES 6

NM
Honored Contributor II
Honored Contributor II

@anuragtripathi 

This should work 

"listField": "data.result",

"keyField": "accountID",

"colsToPropsMap": {

"accountID": "email~#~char",

"name": "email~#~char",

"displayName": "username~#~char",

"customproperty1": "firstName~#~char",

"customproperty2": "lastName~#~char",

"customproperty6": "status~#~char",

"status": "status~#~char"

},

But concern is email field is empty which is mapped to name and it is not able to store and account saviynt.

Try using a field which has value.

anuragtripathi
New Contributor
New Contributor

Email attribute has value but I have cleared here. I have already tried with the list field as data.result but didnt import accounts. Also, I have tried it as "Data" and at colstopropsmapping, I gave result.email, result.firstname but didnt import accounts.

NM
Honored Contributor II
Honored Contributor II

@anuragtripathi can you share logs after running the job.

anuragtripathi
New Contributor
New Contributor

Here are the logs captured with data.result.

[This message has been edited by moderator to mask sensitive information]

NM
Honored Contributor II
Honored Contributor II

@anuragtripathi i text format

Vedanth-BK
Regular Contributor
Regular Contributor

Hello @anuragtripathi 
Please try with the below connection and import account JSON. Make sure you enter the x-Api-key in the connection JSON.

 

 

connection json
--------------------
 { "authentications": {
    "vAuth": {
      "authType": "oAuth2",
      "url": "@HOSTNAME@",
      "httpMethod": "POST",
      "httpParams": {},
      "httpHeaders": {},
      "httpContentType": "text/html",
      "expiryError": "ExpiredAuthenticationToken",
      "authError": [
        "InvalidAuthenticationToken",
        "AuthenticationFailed"
      ],
      "timeOutError": "Read timed out",
      "errorPath": "error.code",
      "maxRefreshTryCount": 5,
      "authHeaderName": "x-api-key",
     
      "tokenResponsePath": "",
      "tokenType": "",
      "accessToken": "*****add the api key here*********"
    }
  }
}
-------------------
import json
--------------------
{
  "accountParams": {
    "connection": "vAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "statusColumn": "customproperty1",
      "activeStatus": [
        "active"
      ],
      "deleteLinks": true,
      "accountThresholdValue": 15,
      "correlateInactiveAccounts": false,
      "inactivateAccountsNotInFile": true,
      "deleteAccEntForActiveAccounts": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://removed.com/dev/uam/v1/users?pageNumber=1&pageSize=1000",
          "httpHeaders": {
            "x-api-key": "${access_token}"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "data.result",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "email~#~char",
          "name": "email~#~char",
          "displayName": "username~#~char",
          "status": "status~#~char"
        }
      }
    }
  },
  "entitlementParams": {},
  "acctEntParams": {}
}

 

[This message has been edited by moderator to mask URL]

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!