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

Account Import Issue Keepnet

rp781
New Contributor II
New Contributor II

Below is the JSON I used for account imports from Keepnet. My connection is successful (Ran test connection params simple get successfully) I was able to import an account with this API https://api.keepnetlabs.com/api/target-users/Psd88ApFLYKx - import account JSON below. 

 

{
    "accountParams": {
        "connection": "acctAuth",
        "createUsers": false,
        "processingType": "SequentialAndIterative",
        "call": {
            "call1": {
                "callOrder": 0,
                "stageNumber": 0,
                "http": {
                    "url": "https://api.keepnetlabs.com/api/target-users/<UserIDHere>",
                    "httpHeaders": {
                        "Authorization": "${access_token}",
                        "Content-Type": "application/json"
                    },
                    "httpMethod": "GET",
                    "httpParams": {
                        "pageNumber": 0,
                        "pageSize": 3000,
                        "orderBy": "resourceId",
                        "ascending": true
                    }
                },
                "listField": "data",
                "keyField": "accountID",
                "colsToPropsMap": {
                    "accountID": "resourceId~#~char",
                    "name": "email~#~char",
                    "displayName": "email~#~char",
                    "customproperty2": "firstName~#~char",
                    "customproperty3": "lastName~#~char",
                    "customproperty4": "isActive~#~char"
                }
            }
        }
    },
    "entitlementParams": {},
    "acctEntParams": {}
}

 

Here is the request for the single user, which the account imported just fine. It is a GET

rp781_0-1698768994484.jpeg

 

The issue with that is it only returns one user at a time rather than all of them. (You'll notice the URL has a hard-coded user ID) The endpoint for this application that allows us to import all users is a POST to this URL "https://api.keepnetlabs.com/api/target-users/search" which when we try doesn't work, JSON posted below. 

 

{
    "accountParams": {
        "connection": "acctAuth",
        "createUsers": false,
        "processingType": "SequentialAndIterative",
        "call": {
            "call1": {
                "callOrder": 0,
                "stageNumber": 0,
                "http": {
                    "url": "https://api.keepnetlabs.com/api/target-users/search",
                    "httpHeaders": {
                        "Authorization": "${access_token}",
                        "Content-Type": "application/json"
                    },
                    "httpMethod": "POST",
                    "httpParams": {
                        "pageNumber": 0,
                        "pageSize": 3000,
                        "orderBy": "resourceId",
                        "ascending": true
                    }
                },
                "listField": "data.results",
                "keyField": "accountID",
                "colsToPropsMap": {
                    "accountID": "resourceId~#~char",
                    "name": "email~#~char",
                    "displayName": "email~#~char",
                    "customproperty2": "firstName~#~char",
                    "customproperty3": "lastName~#~char",
                    "customproperty4": "status~#~char"
                }
            }
        }
    },
    "entitlementParams": {},
    "acctEntParams": {}
}

Here is the postman return for ALL users, which is the POST request

rp781_1-1698768994489.jpeg

Saviynt call and response logs attached as well, thanks.

 

 

 

5 REPLIES 5

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @rp781,

You need to pass the body in the form of the string,

{
  "accountParams": {
    "connection": "acctAuth",
    "createUsers": false,
    "processingType": "SequentialAndIterative",
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://api.keepnetlabs.com/api/target-users/search",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Content-Type": "application/json"
          },
          "httpMethod": "POST",
          "httpParams": "{\"pageNumber\": 0,\"pageSize\": 3000,\"orderBy\": \"resourceId\",\"ascending\": true}}",
          "listField": "data.results",
          "keyField": "accountID",
          "colsToPropsMap": {
            "accountID": "resourceId~#~char",
            "name": "email~#~char",
            "displayName": "email~#~char",
            "customproperty2": "firstName~#~char",
            "customproperty3": "lastName~#~char",
            "customproperty4": "status~#~char"
          }
        }
      }
    },
    "entitlementParams": {},
    "acctEntParams": {}
  }
}

Thanks.

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

rp781
New Contributor II
New Contributor II

Hello Sudesh, thank you for that. 

When I run the import job now, it says Failed. Photo of job log and response/return logs attached

rp781_0-1698966744412.png

 

 

 

 

 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @rp781 ,

Could you please try with the below json once,

{
"accountParams": {
"connection": "acctAuth",
"createUsers": false,
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://api.keepnetlabs.com/api/target-users/search",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpMethod": "POST",
"httpParams": "{\"pageNumber\": 0, \"pageSize\": 3000, \"orderBy\": \"resourceId\", \"ascending\": true}",
"listField": "data.results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "resourceId~#~char",
"name": "email~#~char",
"displayName": "email~#~char",
"customproperty2": "firstName~#~char",
"customproperty3": "lastName~#~char",
"customproperty4": "status~#~char"
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}
}

Thanks

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

Baver
New Contributor
New Contributor

Hi @sudeshjaiswal - This does not work. There is nothing wrong with the formatting. Simply changing the method to a GET and adding a userID at the end of the URL ( that one is doable with a GET ) we receive an individual user successfully. This problem seems to be specific to POST calls.

I can't find in the docs anything about supporting POST in imports and I need to confirm if this is possible and if there is anything specific that needs to be done to support this.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Baver,

Post is supported in the importaccountjson,
Could you please share the complete debug log.

Thanks.

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