Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/23/2024 10:14 AM - edited 07/24/2024 06:01 AM
Hi
I have a use case where I want to make two API calls for creating an account in Saviynt. The first call will create an account, and the second will update the attribute of the account. I have created the below JSON for it. However, it keeps giving an error during the second API call.
I have tried other syntaxes as well, but they are not working.
${account.name}
${account.accountID}
${accountID}
${accountName}
JSON:
{
"showLogs": true,
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 100,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxx/odata/v2/EmpEmployment",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "d.results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty1": "personIdExternal~#~char",
"customproperty22": "lastDateWorked~#~date"
},
"disableDeletedAccounts": false
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "https://xxxxxxxxxxxx/odata/v2/User(${accountName})?$select=isPrimaryAssignment,userId&$format=json",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "d",
"keyField": "accountID",
"nextApiKeyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty3": "isPrimaryAssignment~#~char"
},
"disableDeletedAccounts": false
}
}
}
}
ERROR:
[This post has been edited by a Moderator to remove sensitive information.]
07/23/2024 02:24 PM
07/23/2024 03:29 PM - edited 07/24/2024 05:57 AM
This is for importing an account in Saviynt.
The issue is when I use the ${accountName} under the dependent API call, Saviynt is not able to recognize it and gives an illegal character error. If I replace it with a hardcoded value, it works fine. Even in Postman, it works fine.
https://xxxxxxxxxxxxxxxxxxxxxxxxxx/odata/v2/User(${accountName})?$select=isPrimaryAssignment,userId&...
07/23/2024 03:32 PM
Share logs in text file
07/23/2024 03:52 PM - edited 07/24/2024 06:03 AM
07/23/2024 06:26 PM
Refer https://docs.saviyntcloud.com/bundle/SAPSF-v24x/page/Content/Configuring-Connection.htm
Try below JSON
{
"showLogs": true,
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 100,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false },
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxx/odata/v2/EmpEmployment",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "d.results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty1": "personIdExternal~#~char",
"customproperty22": "lastDateWorked~#~date"
},
"disableDeletedAccounts": false
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "https://xxxxxxxxxxxx/odata/v2/User%28${accountName}%29?$select=isPrimaryAssignment,userId&$format=json",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "d",
"keyField": "accountID",
"nextApiKeyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty3": "isPrimaryAssignment~#~char"
},
"disableDeletedAccounts": false
}
}
}
}
07/24/2024 04:19 AM
Getting the same error with the above JSON as well.
07/24/2024 08:25 AM
{
"showLogs": true,
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 100,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxx/odata/v2/EmpEmployment",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "d.results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty1": "personIdExternal~#~char",
"customproperty22": "lastDateWorked~#~date"
},
"disableDeletedAccounts": false
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "https://xxxxxxxxxxxx/odata/v2/User/\\${accountName}?$select=isPrimaryAssignment,userId&\\$format=json",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "d",
"keyField": "accountID",
"nextApiKeyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty3": "isPrimaryAssignment~#~char"
},
"disableDeletedAccounts": false
}
}
}
}
07/25/2024 02:43 AM
I'm getting the same error with this one as well.
07/24/2024 08:05 AM - edited 07/24/2024 08:34 AM
Hi @Vipul you don't have to add %28
Use this URL
https://xxxxxxxxxxxx/odata/v2/User/${accountName}?\\$select=isPrimaryAssignment,userId&\\$format=json
07/25/2024 02:59 AM
This one is also not working, giving a 404 error as the API format is incorrect. I have added a screenshot of the error.
If I hard-code the value in the API rather than using ${accountName}, it works fine.
This is the harcoded API and works fine in Saviynt: https://xxxxxxxxxxxxxxxxxxxx/odata/v2/User(101009)?$select=isPrimaryAssignment,userId&$format=json&$...
We have to pass the userid in the round brackets, otherwise, it won't work.
07/25/2024 04:22 AM
Hi @Vipul can you try the url with the below format?
"url": "https://xxxxxxxxxxxx/odata/v2/User/\"(${accountName})\"?$select=isPrimaryAssignment,userId&\\$format=json"
07/25/2024 08:03 AM
Getting the same error as the Illegal character.
07/25/2024 08:18 AM
Hi @Vipul ,
Use this URL
https://xxxxxxxxxxxx/odata/v2/User/${accountName}?\\$select=isPrimaryAssignment,userId&\\$format=json
Share complete logs if in case it fails.