We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Can we pass values and call script for Disable Account for Exchange via Rest Connection

AshishDas
Regular Contributor II
Regular Contributor II

Hi,

We need to disable Exchange account for a user on termination. However, that is triggered via powershell script for license disablement on exchange.

We are able to pass the http params via update account json, which includes the username of the user alongwith the location of the powershell script, which works and disables user's license on Exchange on termination, but the user still shows as manually provisioned in Saviynt.

However, can the same parameters be passed via Disable Account Json, so that the user is disabled in EIC as well, which currently shows manually provisioned.

Attaching my update account code: 

{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "<url>",
"httpMethod": "POST",
"httpParams": "{\"Script\":\"Powershell.exe -File c:\/Scripts\/ExchangeDisable.ps1 \\\"${user.customproperty17}\\\"\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": [
{
"message": "ProfileID Created Successfully"
},
{
"message": "ProfileID Updated Successfully"
}
],
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
}
}
]
}

10 REPLIES 10

rushikeshvartak
All-Star
All-Star

You can pass. Are you facing any issue ?


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

AshishDas
Regular Contributor II
Regular Contributor II

Hi Rushi,

We are getting a Null Pointer Exception on passing the Script path and attributes in http params in disable Account JSON

Sha

The bindings supported are:

  • ServiceAccountOwnerMap

  • endpoints

  • userManager

  • approvers

  • arsTasks/task

  • managerAccount

  • requestid

  • response

  • connection

  • userAccount

  • businessJustification

  • user

  • account

 

https://saviynt.freshdesk.com/support/solutions/articles/43000521736-rest-connector-guide%C2%A0#REST... 


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

AshishDas
Regular Contributor II
Regular Contributor II

Hi,

The disable account JSON throws Null Pointer Exception. Any modifications in this that you can suggest?

This script passes the script path along with the user attribute that is used to disable the user's license

 

{
"actions": {
"Disable User": {
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "<url>/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"Script\":\"Powershell.exe -File c:\/Scripts\/ExchangeDisable.ps1 \\\"${user.username}\\\"\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": [
{
"message": "success"
}
]
}
]
}
}
}

task.username


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

AshishDas
Regular Contributor II
Regular Contributor II

Still getting the error with task.username.

AshishDas_0-1670512412171.png

 

task.userKey.username


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

AshishDas
Regular Contributor II
Regular Contributor II

This too isn't working.

Since via Update account task the user license can be disabled, can we run disable account task in Saviynt wherein the user gets suspended on Saviynt endpoint?

The update account task would anyway disable the users license on termination.

But the user should not reflect as manually provisioned in Saviynt

You can't change status on updateaccount task


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

AshishDas
Regular Contributor II
Regular Contributor II

That is right. Hence asking for Disable account JSON.