Setup: Directory sync: Filter AD users with LDAP query

Question

Is it possible to build an LDAP query to get from AD only objects (users) that have the extatt_3 field filled?

Solution

Yes, you can use the sample LDAP query below. Make sure the custom filter field (e.g. extatt_3) exists in your user’s AD profile.

LDAP://server/dc=xx,dc=yy,dc=zz;(&(objectCategory=person)(objectClass=user)(extatt\_3=\*));adsPath,OBJECTSID,sAMAccountName,sn,GivenName,mail,telephoneNumber,mobile,pager,facSimileTelephoneNumber,department,company,EmployeeType,EmployeeId,title,initials,postalAddress,postalCode,physicalDeliveryOfficeName,st,L,co,manager,extatt\_3;subtree

For more information about LDAP search filter syntax, see http://msdn.microsoft.com/en-us/library/windows/desktop/aa746475(v=vs.85).aspx