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

Create Account JSON for Exchange via REST Connector

AshishDas
Regular Contributor II
Regular Contributor II

Hi,

We are trying to create exchange mailboxes on a hybrid environment. We also have the script at a location with logging included. However, the create account JSON is throwing error. Can someone please validate if I am passing the file path and the user attributes correctly from Saviynt?

{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "<url>",
"httpMethod": "POST",
"httpParams": "{\"Script\":\"Powershell.exe -File c:\/Scripts\/Exchange_Mailbox.ps1 \\\"${users.customproperty17}\\\"\"}",
"httpHeaders": {
"Authorization": ""
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"response[6].Objectreturned": ["Success"]
},
"unsuccessResponses": {
"response[6].Objectreturned": ["Failure"]
}
}]
}

On the Powershell script this value, that is cp17 gets passed as $samacc=$args[0];

Error :

AshishDas_0-1669827282993.png

1 REPLY 1

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @AshishDas ,

It seems that you might have some issues with your create account JSON syntax,
Below is the working JSON for Exchange,
{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [{
"name": "call1",
"connection": "entAuth",
"url": "https://xxxxxx/SaviyntApp/PS/ExecutePSScript",
"httpMethod": "POST",
"httpParams": "{\"Script\":\"Powershell.exe C:\/Windows\/Saviynt\/Scripts\/Script.ps1 '${user.systemUserName}' '${user.customproperty20}' \"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"response[9].Objectreturned": ["Success"]
},
"unsuccessResponses": {
"response[9].Objectreturned": ["Failure"]
}
}]
}

Thanks,

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