LDAP search filters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 11:31 AM
Hello ,
How to create LDAP filter which will search for a string that contains name , name+1 ,name+2 etc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 11:40 AM
Example searching for Common Name contains name1 or name2.
(|(cn=*name1*)(cn=*name2*))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 12:23 PM
Hi ,
The numbers can be anything after name, how to use wildcard here , if you could help will be great

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 12:52 PM
Then you need to leave that out of the query. So
(|(cn=*xyz*)(cn=*abc*))
The LDAP Servers setup that ServiceNow has does not allow you to dynamically change the query when it runs.
Or you need to use the AD Integration Hub spoke to use code to generate the query and run it against LDAP.
Knowing what you are trying to do over all would help in pointing you to an option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 09:04 PM
Integration is already done , i want to create username for which I need to check if the username already exists if it exists add 1 at the end , so for example if my username is abel and Abel already exists then it should create abel1 , now for next time again my username is abel it should consider all existing record so now it has abel and abel1 so now it should create abel2 and so on