Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/23/2024 02:50 AM
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"
}]}}]}}
09/23/2024 03:15 AM
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.
09/23/2024 03:44 AM
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.
09/23/2024 04:13 AM
@anuragtripathi can you share logs after running the job.
09/23/2024 04:44 AM - last edited on 09/23/2024 08:47 AM by Sunil
09/23/2024 05:04 AM
@anuragtripathi i text format
09/23/2024 05:27 AM - last edited on 09/23/2024 08:43 AM by Sunil
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]