Systems Management Question
Device Smart Label based on User LDAP Group?
I would like to create a smart label of all devices that are assigned to members of an Active Directory user group. Is there a way to create this type of smart label using the label wizard and/or SQL?
I've tried playing around with the wizard, but don't see any way to associate user labels into a device label.
Community Chosen Answer
I have something that might work for you.
First, make a User LDAP label that looks for members of the AD group in question. See the example below if you need help getting started with that part.
When the User Import runs, the users in that AD group will get this label in KACE.
Next, create a SQL Device Smart Label to look for the LDAP label of the user who uses the Device:
GROUP_CONCAT(L.NAME SEPARATOR ', ') AS LABEL,
from USER U
join MACHINE M on U.FULL_NAME = M.USER_FULLNAME
join USER_LABEL_JT UJT on U.ID = UJT.USER_ID
join LABEL L on UJT.LABEL_ID = L.ID
group by U.FULL_NAME
HAVING GROUP_CONCAT(L.NAME) LIKE '%User - LDAP label created in step 1%'
This will only return one device per user, so you may need to modify as necessary. Also works as a handy report.
Hopefully this helps!