Avatar of Rammy Charles
Rammy Charles
Flag for United States of America asked on

LDAP Query to Find Users

We are looking for an LDAP Query that will return results of only domain users who have the Telephone field populated in AD.

Any suggestions would be appreciated.
Active DirectoryScripting LanguagesWindows Server 2008

Avatar of undefined
Last Comment
compdigit44

8/22/2022 - Mon
REIT

In regards to LDAP queries which can be run to lookup accounts in AD for certain fields populated, look here:

http://social.technet.microsoft.com/wiki/contents/articles/5392.active-directory-ldap-syntax-filters.aspx
Rammy Charles

ASKER
how would be query a specific field in AD?
VB ITS

Try these steps:

In Active Directory Users and Computers, right click on your domain name on the left pane > Find > in the Find dropdown box select Custom Search > click the Advanced tab > type in the following in the in the Enter LDAP query: box then click Find Now:
(&(objectCategory=person)(objectClass=user))(telephoneNumber=*)

Open in new window

LDAP-Query-for-Telephone-No..pngThis should then list all the user accounts that has the telephone number field populated.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
compdigit44

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question