Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Account Expires value set as one day earlier in AD

sdey_2023
Regular Contributor
Regular Contributor

We are trying to provision accountExpires of the User's AD account via ADSI connection from Saviynt but it is setting the value as one day earlier in AD. We are using the below code to provision the same:

"accountExpires":"${user.employeeType=='External'?(10000*(user.enddate.getTime() + 11644473600000)) : 0}"

Could you please confirm what should be the correct code. Thanks.

 

3 REPLIES 3

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @sdey_2023,

Can you please try with this mapping. this will set current time to accountExpires in AD.

"accountExpires": "${(Calendar.getInstance().getTimeInMillis() + 11644473600000L)* 10000L}"


 Thanks,

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

Hi Sudesh, we want to set it same as end date. Please note the time zone in the AD server is of EST, and Saviynt is PST time zone.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @sdey_2023,

Saviynt is in UTC, you need to modify the below json to set the date the accordingly.

"accountExpires": "${(Calendar.getInstance().getTimeInMillis() + 11644473600000L)* 10000L}"
Thanks.
If you find the above response useful, Kindly Mark it as "Accept As Solution".