02-16-2021 08:27 AM
Hi all ,
I need to apply LDAP filter in call manager that apply the below in once customize filter.
1- filter LDAP users whom first name start with "test" or "serv"
2- filter LDAP users whom don't have Email address.
Thanks
02-16-2021 09:29 AM
you can find many threads in the support forum related to the LDAP custom filter. Please go through the below reference and you may find it easy to construct as per your requirement.
https://www.uccollabing.com/cucm-ldap-filters-explained-find-ldap-attributes-easily/
Please let us know if you still find it too difficult.
Regards,
****Please rate the post if you find it usefull.
02-16-2021 10:19 AM
This is the standard filter that CM will apply even if you don't have defined any custom LDAP filter.
Standard default LDAP filter for users (&(objectclass=user)(!(objectclass=Computer))(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))
If you would want to add the criteria that you list you would do this.
(&(objectclass=user)(!(objectclass=Computer))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))(email=*)(|(givenName=test*)(givenName=serv*)))
To explain the part some I loaded the filter into a LDAP browser to get a graphical depiction of it.
02-26-2021 03:08 AM
02-26-2021 03:51 AM
Would you mind to rephrase what you want as the result of the filter? In the event that I might have misread what you wrote from the start.
03-02-2021 12:44 PM
Exactly I need to NOT sync all users that match the below condition (XOR)
1- don't have email ID
2- first name starts with SVC
3- first name starts with health
when I applied the filter which I shared in last message , it did filter many other users and impacted the cisco agents .
03-02-2021 11:56 PM
Then your filter should be this.
(&(objectclass=user)(!(objectclass=Computer))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))(email=*)(|(!(givenName=SVC*))(!(givenName=health*))))
In the LDAP builder it would look like this.
The difference is that you need to negate the given name part to filter them out. For email that's not needed as you're filtering on that this field has a value, any user with no email address should be filtered out.
02-26-2021 05:06 AM
To be clear the filter that you have built would include the users that the filter match. If that is not what you intend the filter needs to be modified.
05-21-2023 01:28 AM
how can we exclude specific OU from sync ?
05-21-2023 02:54 AM
If the OU is visible in the search path you cannot exclude it as such from the synchronous with a LDAP filter as CM do not support filtering on members of a OU. What you can do is filter on users that belongs to a security group and without to much hassle you should be able to write a PowerShell script that looks for users in the OU and adds them into the group. With that you should effectively have filtered out users in the OU.
05-21-2023 07:23 PM
You can't filter the OU, instead of syncing from full domain, make multiple LDAP directory and sync each OU. But remember that you can have only 20 LDAP directories.
05-23-2023 07:53 AM
Remove read rights to that OU on the user you configured for the sync.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide