GCDS is a fun little toy! 🙂
There are probably several ways to solve this.
One easy way would be to make sure all users within the AD OU Service Accounts to be member of an AD-group, and then !exclude those members from being synced.
Or, add the full OU path to the LDAP query in the Rule field. Perhaps as an OR to the negative rule of not syncing disabled users. or its own AND rule.
This should do it.
(&
(objectCategory=person)
(objectClass=user)
(mail=*)
(!(userAccountControl:1.2.840.113556.1.4.803:=2))
(!(distinguishedName=*,OU=Service Accounts,OU=ICS,DC=ics-milw,DC=org))
)
Actually I think a shorter version is enough.
(&
(objectCategory=person)
(objectClass=user)
(mail=*)
(!(userAccountControl:1.2.840.113556.1.4.803:=2))
(!(OU=Service Accounts,OU=ICS,DC=ics-milw,DC=org))
)
Currently you have a veeeery simple rule to grab everything inside ICS.
The easiest way to accomplish what you want... is to add all users within ISC to a group, except for those in the Service Account OU, and add that as a requirement to your simple LDAP Rule. This logic can then be replicated however many excusion OUs you have in the AD.
Do note that, so far, all of this is done in the AD.
Next step, making sure GCDS doesn't touch manually created accounts.
In the Google rules at the top of GCDS, you should also exclude any and all OUs where you have manually created users, as GCDS should never touch them. And you should, of course, never put manual users inside OUs of synced users.
--
https://wheretofind.me/@NoSubstitute