Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/14/2024 12:51 PM
Hi Team,
I have a requirement below
If i want to enable the account based on user custompropery15 means if we are passing start date as 15-07-2024 in custompropery15 field.So when the currentdate matches with customproperty15 then analytics should run and based on that enable account task will get created.
Please let me know the analytic query to enable the account.
07/14/2024 01:51 PM - edited 07/14/2024 01:55 PM
Select a.name,
a.accountkey AS acctKey,
a.endpointkey,
'enableAccount' AS Default_Action_For_Analytics
FROM
accounts a
JOIN
user_accounts ua ON a.accountkey = ua.accountkey
JOIN
users u ON ua.userkey = u.userkey
WHERE
a.lastlogondate BETWEEN '2024-01-01 00:00:00' AND '2024-12-31 23:59:59'
AND a.endpointkey = 10
AND u.customproperty15 = DATE_FORMAT(NOW(), '%d-%m-%Y')
AND a.status IN (1, 'Manually Provisioned')