and more in a single search tool across platforms. Read the announcement here. |
08/24/2022 10:08 AM
Hi Team,
we are using rest API connection, which is triggering powershell script in remote server . Everything is working fine when successful . Let’s say when powershell script is triggered , As per Saviynt , it has called the script and gets success msg . After going to powershell script , if for some reason it didn’t execute the task , how can Saviynt keep the task in pending only ?
please send sample script for such error handling if anyone has it ?
thanks
ankit
08/24/2022 09:48 PM
08/25/2022 07:07 AM
Hi @Ankyt19,
When does Saviynt close out the task successfully ? How does Saviynt know when to keep the task open and when to keep it in a pending state ? When it recieves a response from the call right.
You could map the response back in your API call, similar to the snippet shared below based on the response. for e.g.
"SuccessResponses": {"": ["Success"]},
"unsuccessResponses": {"responseMessage": ["\"Failed\"","\"Powershell script taking too long \""]}
08/29/2022 07:28 AM
Hi @avinashchhetri ,
I am using below snippet to capture failed message:
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"response[6].Objectreturned": ["Success"]
},
"unsuccessResponses": {
"response[6].Objectreturned": ["Failure"]
Just for your info, If it fails to communicate to remote server to execute any tasks, it does remain in pending task with some error .
But lets say , If it is able to connect to remote server and executed powershell script, it doesn't show in failed task(pending task) it goes to completed task and unless we go and check in powershell script logs , we will not be able to identify . Hence we would like to know if anyone can help me with some snippet to capture error from Powershell script ?
Thanks
Ankit
08/29/2022 08:23 AM
What does the response in the logs show when it connects and executes but fails for some reason ?
01/24/2023 02:50 AM
{"Objectreturned":"The user is null","Length":"17"} statusCode":200,"description":null,"status":"Success"}}
02/16/2023 05:24 AM
Hi @avinashchhetri and @rushikeshvartak and @ashisht @Harish_Yara @SureshV
Please suggest if anything on capturing error or string message and add in create account json , so that unsuccess responses will have the task in PENDING instead of completed .
Thanks
Ankit
02/27/2023 05:51 AM
04/05/2023 04:57 AM
Hi All,
Please suggest to fix the issue stated below.
Issue - New Account pending task is created for REST connector, when an issue occurs pending task is getting completed and task status is showing as complete.
Expectation - When an issue occurs the task should be discontinued or Errored out then move to Completed Task list.
Please suggest what config to add to make this happen?
04/05/2023 07:49 AM
Can you share Create Account JSON. Also, the logs snippet for the response when you get the error and the task still gets completed.
04/05/2023 10:10 AM
Hi @SB
Please find Create Account JSON
{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "https:xxxxx",
"httpMethod": "POST",
"httpParams": xxxx
"httpHeaders": {
"Authorization": ""
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"response[6].Objectreturned": ["Success"]
},
"unsuccessResponses": {
"responseMessage": [{"Objectreturned":"The user is null"}]
}
}]
}
Note : String The user is null is thrown from Powershell script to Saviynt in Provisioning Comments of Completed Task.
For your reference below is the Log nippet.
Regards,
Harish
04/05/2023 10:57 AM
Can you also share the complete logs with the response included when you get the error