Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

UpdateUserJson not triggering powershell script but tasks being closed

jralexander137
New Contributor III
New Contributor III

Hi, I am trying to get my updateUserJson to trigger a PS Script using the saviynt app installed on a windows server. The tasks complete, improperly, and the script is not actually being executed. Works fine when i make the call from postman. Is there some issue with my updateUserJson config?

{ "accountIdPath": "accountName", "responseColsToPropsMap": {}, "call": [ { "name": "call1", "connection": "userAuth", "url": "https://saviyntwinpsdev.xxx.com/SaviyntDev_WinPS/PS/ExecutePSScript ", "httpMethod": "POST", "httpParams": "{\"Script\": \"E:\/TestMailboxProvisioning3.ps1 \\\"${user.systemUserName}\\\"\"}", "httpHeaders": { "Authorization": "${access_token}" }, "httpContentType": "application/x-www-form-urlencoded", "successResponses": { "statusCode": [200] } } ] }

[This message has been edited by moderator to disable hyperlink to an url]

This post is sounds like the same issue but what they did to resolve it is already correct on my end. https://forums.saviynt.com/t5/identity-governance/rest-exchange-ps-1-script-not-triggered/m-p/36965/... But to be sure, here is my connectionJson

{
"authentications": {
"userAuth": {
"authType": "Basic",
"url": "https://saviyntwinpsdev.xxxx.com/SaviyntDev_WinPS/PS/ExecutePSScript",
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {},
"httpContentType": "text/html",
"properties": {
"userName": "username",
"password": "password"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "Basic",
"testConnectionParams": {
"responseColsToPropsMap": {},
"http": {
"url": "https://saviyntwinpsdev.xxxx.com/SaviyntDev_WinPS/PS/ExecutePSScript",
"httpMethod": "POST",
"requestBody": "",
"httpParams": "{\"Script\": \"Test-NetConnection localhost\"}",
"httpHeaders": {
"Authorization": ""
},
"httpContentType": "application/x-www-form-urlencoded"
},
"successResponses": {
"response[0].PingSucceeded": [
"True"
]
},
"successResponsePath": "responseText",
"errors": [
"fail",
"error"
],
"errorPath": "responseText"
}
}
}
}

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Does create account worked ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I have updated my post with additional information. I don't need to use createAccountJson unless I want an account created in Sav, correct? My understanding is the update user json is appropriate for what I am doing.

jralexander137
New Contributor III
New Contributor III

I have not tried createAccount because I assumed it would attempt to create an account link in saviynt which I don't want. Just want the script to execute...should I try it anyway?