DA Custodian Manager - how to get a list of AD group members
Hi
EV/DA 9.0.2
I would like to pull a list of AD group members from Custodian Manager so I can get a historical list of who was in a specific group.
Is there a SQL query I can use?
thanks!
If you want a listing of all Custodians where were members of some Custodian Group at some point in time, try this:
SELECT titttgh.TargetGroupID
, ttg.Name AS 'Target Group Name'
, titttgh.AddressOwnerID AS 'Disabled User ID'
, tau.DisplayName AS 'Disabled User Display Name'
, titttgh.HistEndDate AS 'Date User Disabled'
FROM tblIntTargetToTargetGroupHistory AS titttgh
JOIN tblAddressUser AS tau
ON titttgh.AddressOwnerID = tau.AddressOwnerID
JOIN tblTargetGroup as ttg
ON titttgh.TargetGroupID = ttg.TargetGroupID
ORDER BY tittgh.TargetGroupIDThere can be some minor changes to the above query to provide a listing of who is currently in the Custodian Groups.
I modified the query and got it to run, there was a typo in the Order By clause. Try this:
SELECT titttgh.TargetGroupID
, ttg.Name AS 'Target Group Name'
, titttgh.AddressOwnerID AS 'Disabled User ID'
, tau.DisplayName AS 'Disabled User Display Name'
, titttgh.HistEndDate AS 'Date User Disabled'
FROM tblIntTargetToTargetGroupHistory AS titttgh
JOIN tblTargetGroup as ttg
ON ttg.TargetGroupID = titttgh.TargetGroupID
JOIN tblAddressUser AS tau
ON tau.AddressOwnerID = titttgh.AddressOwnerID
ORDER BY titttgh.TargetGroupID