A company phone book application is part of nearly every SharePoint portal. With BDLC you can build it in just minutes. Simply connect a native SharePoint list directly to an Active Directory LDAP query. The results are cached in the list and updated regulary. You can use all list features, e.g. views and fast search to improve your application.
Fig. Create a new custom list, goto list settings and click "Connect to external data source"
Fig.: Configure the connection to Active Directory via LDAP (or any other provider). Follow the instructions below.
Fig.: After update you have a native list with your Active Directory data query results. Please customize the view, try search when indexed.
Please note:
- Select the OLEDB Provider to connect to AD via LDAP.
- You can use the following connection string: Provider=ADSDSOOBject; User Id=MyDomain\myUser;Password=myPWD;Mode=Read;Bind Flags=0;Page Size=1000;
- Please validate connection.
- 1000 items is the max page size of the LDAP driver. You can use Ntdsutil.exe to increase: http://support.microsoft.com/kb/315071
- You can use a select statement like this:
SELECT Statement: SELECT title, name, ADSPath, givenName, cn, co, company, department, description, displayName, l, mail, mobile, physicalDeliveryOfficeName, postalCode, sAMAccountName, sn, st, streetAddress, telephoneNumber From 'LDAP:// /DC=myDomain,DC=com WHERE objectClass='user' AND objectCategory='Person'
- Please validate query.
- If you have issues, please start with a high privilaged account and a very simple query,e.g. name only.
- Please preview results.
- Please enter ADSPath as primary key, or use any other field, that is unique in your query.
- Add columns (that creates the list structure for your query result set).
- Use "check mapping" to check, that all list columns are mapped to query fields.
- Press update. There should be something like xxx items inserted.
- Enable "Background Update" to sync every hour or setup other interval (see documentation).
- Close and switch to the list
- Upps ... 10 minutes are over ;-)
- You can change some column titles for better user experience, no problems with updates.
- You can add a calculated column to link or display an photo of the person etc.
- You can add any other "SharePoint-only" column to enter additional information. It will be kept while updating (if your primary key works).
Sorry that you can't use a contact list for that, e.g. with Outlook syncronization. The LDAP driver does not support aliases in SQL required for field column mapping with pre-defined column names.