Great to hear you were able to get it working.
Also note, the "Filter Expression" field you enter that into supports multiple line entry AND comment lines, as shown in my post above.
The whitespace and comments are stripped out when the filter is actually used, so this doesn't impact on the actual LDAP query performed.
This can help when you have a complicated expression and you want to make the intent behind it clearer.
For clarity, your expression could be written as:
(&
(objectClass=user)
(objectCategory=person)
(|
# Match users in any of these groups
(memberOf=CN=Group1,OU=ou-name,DC=domain,DC=com)
(memberOf=CN=Group2,OU=ou-name,DC=domain,DC=com)
(memberOf=CN=Group3,OU=ou-name,DC=domain,DC=com)
)
(|
# Match users by any of these criteria
(sAMAccountName=*@SEARCH@*)
(displayName=*@SEARCH@*)
(cn=*@SEARCH@*)
(sn=*@SEARCH@*)
(givenName=*@SEARCH@*)
)
)