Chapter 17. Using LDAP Directory Services

Overview of LDAP Services 423

Configuring a Directory Service Account in Outlook 423

Using LDAP to Find People 429

LIGHTWEIGHT Directory Access Protocol (LDAP) is a standard method for querying directory services. For example, you can query LDAP servers for the address, phone number, or other information associated with an entry in the directory. Windows Server uses LDAP as the primary mechanism for accessing Active Directory Domain Services (AD DS).

This chapter explores LDAP and explains how to configure LDAP directory service accounts in Microsoft Outlook 2010.

LDAP was designed to require less overhead and fewer resources than its predecessor, Directory Access Protocol (DAP), which was developed for X.500, a standards-based directory service. LDAP is a standards-based protocol that allows clients to query data in a directory service over a Transmission Control Protocol (TCP) connection. AD DS, Novell eDirectory, IBM WebSphere, and directory services on the Internet such as Bigfoot, InfoSpace, and Yahoo! all employ LDAP to implement searches of their databases.

Note

You will find much more information about LDAP at technet.microsoft.com if you perform a search for LDAP or “Lightweight Directory Access Protocol.”

In addition to supporting email accounts, Outlook 2010 also allows you to add LDAP-based directory service accounts that enable you to query for subscriber information in the remote server’s directory. The LDAP server might be internal to your organization, hosted by another company, or one of several LDAP directories located on the Internet. With an LDAP account in your profile, you can look up names, addresses, and other information stored in the directory.

To set up and configure an LDAP account in Outlook 2010, follow these steps:

  1. Open the Mail item in Control Panel and click E-mail Accounts. Alternatively, if Outlook 2010 is already started, click File, Account Settings, and Account Settings.

  2. Select the Address Books tab, and then click New.

  3. Select Internet Directory Service (LDAP), and then click Next.

  4. On the Directory Service (LDAP) Settings page of the Add New E-Mail Account wizard, shown in Figure 17-1, type the server name or the Internet Protocol (IP) address in the Server Name box.

  5. If the server requires authentication, select the This Server Requires Me To Log On check box. Specify the logon credentials in the User Name and Password boxes. If you’re authenticating on a Windows Server domain controller, include the domain by entering <domain>\<user> in the User Name box, where <domain> is the domain name and <user> is the user account.

  6. Click More Settings to open the Microsoft LDAP Directory dialog box, shown in Figure 17-2.

  7. Change the name in the Display Name box to the name that you want Outlook 2010 to display in the address book for the directory service.

  8. In the Port box, type the port number required by the LDAP server. The default port is 389, although you can use 3268 for most searches in an AD DS global catalog (GC).

  9. You can select the Use Secure Sockets Layer (SSL) check box to connect to the LDAP server through SSL. This option works only if the server allows an SSL connection. If using SSL, the default port is 636 (or 3269 for the GC).

  10. In the Microsoft LDAP Directory dialog box, click the Search tab, shown in Figure 17-3.

  11. Specify the search time-out and the maximum number of entries you want returned in a search. In the Search Base box, either select Use Default (the Users container) or type the root for your search in the directory. If you’re searching AD DS, for example, you might enter dc=<domain>,dc=<suffix>, where <domain> is your domain name (without the domain suffix). Specify the domain suffix (net, com, org, or us, for example) as the last data item. (See the following section, Setting the Search Base, for more details.) To be able to browse the directory, select the Enable Browsing (Requires Server Support) check box. The AD DS domain controller must allow browsing for this feature to work.

  12. Click OK to close the dialog box, and then click Next and click Finish to complete the account setup.

You can use the directory service accounts created in Outlook 2010 to perform LDAP queries from within Outlook 2010.

The search base for an LDAP query specifies the container in the directory service where the query will be performed. You can set the search base to target more closely the information that you’re trying to find, but to do so, you must understand what the search base really is. (For AD DS queries, you can generally use the Default search base to locate users.)

Each entry in the directory has a Distinguished Name (DN), which is a fully qualified name that identifies that specific object. Relative Distinguished Names (RDNs) are concatenated to form the DN, which uniquely identifies the object in the directory. RDNs include the following:

For example, assume that you want to search the Users container in the domain tailspintoys.com. The search base would be as follows:

cn=users,dc=tailspintoys,dc=com

Notice that the domain is represented by two dc attributes. If the domain that you are searching is microsoft.com, you would use dc=microsoft,dc=com instead.

In some cases, the part of the directory you want to search will be in a specific organizational unit (OU), or you might be setting up multiple LDAP accounts in Outlook 2010, each configured to search a specific OU. For example, perhaps your company has Sales, Marketing, Support, External Contacts, and a handful of other OUs, and you want to configure an LDAP query for each one. One solution is to add an LDAP service for each and configure the search base accordingly. For example, let’s say we’re configuring an LDAP service account to query the Support OU in the tailspintoys.com domain. The search base would be as follows: ou=support,dc=tailspintoys,dc=com.

Keep the following points in mind when deciding on a search base:

If you decide to include a search base, determine the common name for the object or OU, and then add the domain. You can’t specify just the ou or cn attribute without the domain, but you can specify the domain by itself to perform a top-down search of the domain.

You can perform LDAP queries in Outlook 2010 by using directory service accounts you add to Outlook 2010. Follow these steps to perform an LDAP query with an LDAP server in Outlook 2010: