Active Directory LDAP Filters
LDAP syntax filters can be used in StaffMap to query Active Directory for user imports or syncs. A filter specifies the conditions that must be met for a record to be included in the query. LDAP queries use the following syntax:
(<AD Attribute><comparison operator><value>)
The following operators can be used:
These are examples of some LDAP filters that work in StaffMap:
You can read more about search filter syntax here.
How to Generate a Filter (Windows Server 2012)
Filters can be generated with the help of the Active Directory Users and Computers tool. The following example will build a query to select users who have their Office location set to NY.
- From the Server Manager Tools menu, select Active Directory Users and Computers.
2. Right click the Saved Queries folder and select New > Query.
3. Give the Query a name, then select Define Query.
4. In the Find dropdown, select Users, Contacts, and Groups.
5. Select the Advanced tab, then select Field > User > Office Location. Set the condition and value, then Add.
6. Select Add, then OK.
7. In the resulting Edit Query form, copy the Query string for use in StaffMap.
8. Select OK to save the query.