Filters: Optional LDAP Query Filter2019-09-16 14:14:31
AD LDS ADAM Active Directory Amazon Simple AD Azure Features Google (G Suite) Lotus Notes / Domino UnitySync
This option is only valid against an LDAP Directory Source (not ODBC, LDIF, CSV etc).
When the Source is an LDAP directory, UnitySync sends an LDAP query and asks for specific information. Filters can be used to include and/or exclude objects based on their values. By default, each Discovery uses an automatically generated search query, usually broad and based on mail=* and the appropriate objectclass types you want to pull.
Custom Filters may be added to include and/or exclude objects based on certain values. Attribute filters can be placed on the object types listed below. These optional filters are added to the default syntax. If you are pulling multiple Source object types, it may be appropriate to specify the same filter in more than one filter parameter, or the filters may be different for each object type:
User: Filter entered here will be applied to Source objects of type User/Mailbox.
Contacts: Filter entered here will be applied to Source objects of type Contact/Custom Recipient.
Groups: Filter entered here will be applied to Source objects of type Group/List.
Public Folders: Filter entered here will be applied to Source Public Folders.
Understanding the following Operator Symbols will aid you in forming your LDAP query strings.
Operator | Use when:
:-: | ——-
& (AND) | All specified filters must be true for the statement to be true. For example,
(OR) | At least one specified filter must be true for the statement to be true. For example
! (NOT) | The specified statement must NOT be true for the statement to BE true. Not that only one filter is affected by the NOT operator. For example, if you have an AND filter string as above and one of your filters must not be true, it would look something like
Keep in mind that Boolean expressions are evaluated in the following order:
- innermost to outermost parenthetical expressions first
- all expressions from left to right
|(manager=*)||The manager attribute is populated|
|(sn=Jones)||Entries with Surname of Jones|
|(sn=A*)||Entries when Surname begins with A|
|(mail=HC4)||HC4 is in the SMTP address|
|(!(email@example.com))||Exclude any SMTP w/ this domain|
|(!(st=Florida))||Exclude entries when state = Florida|
|(&(department=sales)(l=McLean))||Entries from sales AND in McLean|
Actual attributes and objects vary by directory.
If you need assistance forming your query, please contact our Technical Support Team for assistance.
Office 365 (O365) Filter
As of UnitySync v2.8, filters for an Office 365 (O365) Source follows the usual LDAP format described above, with a few caveats; see Office 365 (O365) Discovery Filters (v2.7.28 and newer).
If you are still using v2.7 and earlier, we urge you to upgrade to take advantage of vastly improved handling overall as well as specifically in regards to filters.