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

Account expires in AD- Update account fails

Prajna
New Contributor
New Contributor

Hi Team,

We are using the below mentioned logic for account expires in the update account json. But this logic fails if both termDate and enddate is null. Can you please help us with a logic wherein it will update the account expires attribute to '0' if enddate and termdate is null.

"accountExpires": "${if(user.termDate!=null && user.termDate!='') {10000*(user.termDate.getTime() + 11644473600000)} else {10000*(user.enddate.getTime() + 11644473600000)}}"

Regards,

Prajna Paramita Mahapatro

1 REPLY 1

rushikeshvartak
All-Star
All-Star

"accountExpires": "${(user.termDate != null && user.termDate != '' ? 10000 * (user.termDate.getTime() + 11644473600000) : (user.enddate != null && user.enddate != '' ? 10000 * (user.enddate.getTime() + 11644473600000) : 0))}"


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