You can query a ldap directory with the help of ldap client tool such as below
Apache Directory Studio
When you need to search for an entry in LDAP, you must provide the base (Base Dn) of the search and a filter.
usage: ldapsearch [options] filter [attributes...]
filter RFC-1558 compliant LDAP search filter
attributes whitespace-separated list of attributes to retrieve
(if no attribute list is given, all are retrieved)