Along with native over-the-air CalDAV and ICS support, iPhone OS 3.0 also introduces LDAP integration. Although LDAP is somewhat less common than the calendaring features, it still has a significant share of the directory market and is found in all sorts of products. Home users are unlikely to encounter it, since Google, Yahoo, MobileMe, and the like don’t use LDAP, but corporate users have long requested this feature so they could access their Microsoft Active Directory or Apple Open Directory server. Indeed, third-party applciations like LDAPeople were already providing support before iPhone OS 3.0 appeared.
Note that if you are using Exchange ActiveSync for your corporate email, the iPhone will probably already be able to search the Global Address List (GAL) without setting up LDAP. This didn’t work for me under 2.0, but now that I’m using 3.0 I can search the GAL through ActiveSync. Even if you can do this already, there may be other LDAP servers you need to access. Here’s how!
How To Set Up LDAP Access
Setting up LDAP is simple. Follow these steps:
- On the iPhone, select “Settings”
- Select “Mail, Contacts, Calendars”
- Select”Add Account…” under “Accounts”
- Select “Other” at the bottom
- Select “Add LDAP Account”
- Enter your LDAP Server’s name (e.f. “ldap.example.com”)
- You will probably have to enter a user name (e.g. “sfoskett”) for “User Name” and a password for “Password”
- Optionally modify the description
- Select “Next” and you’re done!
Your LDAP server should now show up in the Contacts application. You can search and use addresses directly from here, but you can’t edit them or add them to the phone’s address book. LDAP addresses are also integrated into the mail, phone, and SMS apps – just start typing a name and the iPhone will query LDAP as well as any local or synced contacts!
If you have a large LDAP server, you may also have to enter a “search base” to limit the scope of your search queries. You can do this only after you have set up the LDAP account.
- Go back to “Settings”
- Select “Mail, Contacts, Calendars”
- Select the LDAP account
- Select “Add Search Settings…”
- Enter your search base string under “Base” (e.g. “ou=people,dc=example,dc=com”)
- Optionally enter a description
- Select “Base”, “One Level”, or “Subtree” depending on where you want to search
- The iPhone tries to use SSL by default. If your server doesn’t support this, it will time out and try to connect without.
You can set multiple Search Settings to allow searches in different search bases from the same LDAP server.
There are some limitations to the iPhone’s LDAP implementation, however:
- You have to enter the search base manually rather than having it automatically filled in by the software. Cut and paste is very helpful here!
- It doesn’t appear to support Kerberos authentication
- You can’t browse the directory (it’s search-only) so you have to know who you’re looking for ahead of time
- LDAP information is limited to phone numbers, a single work addresses, and a single email address
There you have it! Is anyone aware of a useful public LDAP server? I can imagine all sorts of info that would be nice to have while on the go – airline phone numbers, taxi companies, etc.
LudoMP says
You might want to check http://freeldap.org/ It’s a public LDAP server that allows you to import/manage your own address book.
sfoskett says
FreeLDAP.org looks pretty cool. It would allow a user to maintain a central address book for use in the iPhone, Apple Address Book, Outlook, and anything else that supports LDAP. Neat!
Giovanni Bajo says
Hi, I managed to configure a corporate LDAP account; it works correctly when I explicitly query it (within Contacts, by manually selecting the LDAP account in the group selection), but the contacts do not show if I select “all accounts” in the group selection (which, AFAICT, is the default whenever I want to start a phonecall or send a SMS, for instance).
Any idea?
Giovanni Bajo says
Hi, I managed to configure a corporate LDAP account; it works correctly when I explicitly query it (within Contacts, by manually selecting the LDAP account in the group selection), but the contacts do not show if I select “all accounts” in the group selection (which, AFAICT, is the default whenever I want to start a phonecall or send a SMS, for instance).
Any idea?