Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Active Directory: Search for only user objects

I'm using the search filter "(objectClass=user)" to find user objects, but of course it also returns computers because a computer also has user in its objectClass. How can I create a filter to only return objects users and not objects whos type inherits from user?

like image 436
Jeremy Avatar asked Sep 09 '09 17:09

Jeremy


People also ask

How do I filter Active Directory users?

From your AD/LDAP Directory, in either: Directory Settings: Click directory -> Click Advanced Settings -> Search Filters | Additional User Filters. Import Users: Actions -> Import Users -> Click "Change Filters"

What is LDAP search filter?

1. Search Filter is a basic LDAP Query for searching users based on mapping of username to a particular LDAP attribute. 2. The following are some commonly used Search Filters. You will need to use a search filter which uses the attributes specific to your LDAP environment.


1 Answers

(&(objectClass=user)(objectCategory=person))

(via msdn)

like image 76
ax. Avatar answered Jan 03 '23 13:01

ax.