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

Not to Disable Account when Remove Account Task is generated.

ashutoshkumar16
New Contributor II
New Contributor II

Hi Experts,

We have a requirement where if a User is been flaged with Do Not Disable,  we should not be disabling its Account.

As part of Termination, we have enabled the User Termination from import as a result when User is terminated, it automatically generates Remove Account Task for all the applications and does not checks for flag.

We are thinking to add a condition to check the flag in RemoveAccountJSON and not to take any action.

Currently below is our RemoveAccount JSON in AD :

{
"removeAction": "${(task.source == 'ANALYTICS_V2')?'DELETE':'SUSPEND'}",
"deleteAllGroups": "Yes",
"userAccountControl": "546",
"accountExpires": "${if(user.enddate != null){10000*(user.enddate.getTime() + 11644473600000)} else {if(user.termDate != null){10000*(user.termDate.getTime() + 11644473600000)}else{'0'}}}"
}

I have tried to add a check in above code but it is not working:

{
"removeAction": "${(user.customproperty15 != null) ? '' : (task.source == 'ANALYTICS_V2')?'DELETE':'SUSPEND'}",
"deleteAllGroups": "${(user.customproperty15 != null ) ? 'NO' :'Yes'}",
"userAccountControl": "(user.customproperty15 != null ) ? '' :546",
"accountExpires": "${if(user.customproperty15 != null ){'0'} else{if(user.enddate != null){10000*(user.enddate.getTime() + 11644473600000)} else {if(user.termDate != null){10000*(user.termDate.getTime() + 11644473600000)}else{'0'}} }}"
}
 

 

 

2 REPLIES 2

rushikeshvartak
All-Star
All-Star

WHat is error in logs 


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

@rushikeshvartak , its a syntax error I a getting 

I tried above code and also below, Still I am getting same error 

{

${if(user.customproperty15 != null){'"removeAction": "'+ (task.source == 'ANALYTICS_V2')?'DELETE':'SUSPEND' +'","deleteAllGroups": "Yes","userAccountControl": "546","accountExpires": "'+(user.enddate != null) ? 10000*(user.enddate.getTime() + 11644473600000) : (user.termDate != null) ? 10000*(user.termDate.getTime() + 11644473600000) : '0'+'"'}}
}