Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/29/2024 08:10 AM
Hi Team,
We were using customquery to update few attributes in user table as it is deprecated. We were trying to find work around. So help me to find easier and efficient ways to do so for below queries:
To update date in CP:
update users u set u.customproperty43 = DATE_FORMAT(enddate, '%b %d, %Y %H:%i') where employeetype = 'guest' and statuskey = 1
To update FN,LN, displayname from differnt endpoint:
update users u, accounts a, user_accounts ua, endpoints e set u.displayname = a.displayname, u.firstname = a.customproperty5, u.lastname = a.customproperty11 where u.employeetype = 'Guest' and u.userkey = ua.userkey and ua.accountkey = a.accountkey and e.endpointname = 'XXX' and a.endpointkey = e.endpointkey
To update manager:
UPDATE users u, users m SET u.manager = m.userkey WHERE u.employeetype = 'guest' and u.owner is not null and u.owner=m.email
Can we update all this one go in SAV4SAV rest connector? Which would be best way in modifyuserjson or updateuserjson or via analytics?
Thank you,
Harsha
05/29/2024 12:48 PM
Use sav4sav connector
Refer Saviynt API Documentation https://docs.saviyntcloud.com/bundle/API-Reference-Guide/page/Content/API-References.htm
05/30/2024 02:12 AM
Thank you for replying yes I have used sav4sav connector. But to update manager I am having issue.It isnt updating the manager field instead it is updating owner. This what I had used:
select u.username,DATE_FORMAT(u.enddate, '%b %d, %Y %H:%i') as testend, a.displayname as Azdisp,a.customproperty5 as Azfn,a.customproperty11 as Azln, m.userkey as Manage from users u,users m,accounts a, user_accounts ua, endpoints e where u.employeetype = 'guest' and u.statuskey = 1 and u.userkey = ua.userkey and ua.accountkey = a.accountkey and e.endpointname = 'XXX' and a.endpointkey = e.endpointkey and u.owner is not null.
Thank you,
Harsha
05/30/2024 07:14 AM
Can you explain how this query is used ?