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

Delete the Account whose user's endate is + 30 calender days

AravindK
Regular Contributor
Regular Contributor

Hi Team,

We have an requirement to delete the AD account after 30 Days of User's end date value and we are trying to trigger from Analytic. 

Please confirm  if the below condition is correct as per our requirment? if not correct me pls?

select u.username,u.statuskey as 'User Status',u.enddate as 'User Enddate',u.email as 'User Email',a.status,a.accountid from users u,accounts a,user_accounts ua where ua.userkey=u.userkey and a.accountkey=ua.accountkey and a.endpointkey=174 and u.customproperty23='Terminated' and Date_add(u.enddate, INTERVAL 30 day) < current_date() 

Thanks,

2 REPLIES 2

AmitM
Valued Contributor
Valued Contributor

@AravindK , is your query not working as expected? 

Manu269
All-Star
All-Star

@AravindK any specific reason using Analytics.

Why dont you use user update rule : Updating User Update Rules (saviyntcloud.com)

Deprovision Access

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.