This page demonstrates how to call LDAP from JavaScript

If you have the airius database loaded on a Directory Server running on the same machine as the web server, you can do queries against it from this page. The HTML page has the host name (localhost) and port (389) as defaults, so you don't have to worry about them. You can change the host to ldap.four11.com or ldap.bigfoot.com, and use an empty "Search base" below if you want to, but be sure to make the search filter unique (e.g. cn=abcd*), or the server will return an error because of too many matches.

You can take a result (a line) found in the search results and paste it into the "Distinguished name" field of the "Read" section below, to get all the properties of that entry.

Host

Port

Searching

To search, enter a base, a filter and press "search". The radio buttons determine whether "distinguished names" or "common names" are displayed in the results. Examples of search bases in the demo database:

ou=People,o=airius.com
o=airius.com

An example of a filter (to find all entries with a "Common Name" starting with "r") is:

cn=r*

Search base

Search filter

Show Distinguished names Show Common names

Reading an entry

To read an entry and list all attributes, enter a distinguished name and press "readDN". An example of an entry in the demo database is:

uid=tmorris,ou=People,o=airius.com

Distinguished name