How to build a SharePoint phone book using Active Directory in 10 minutes?
Business Data List Connector for SharePoint solves many issues
that still exist with the SharePoint out-of-the-box external data
integration. It makes it as easy as possible to connect native
SharePoint lists to almost any external data sources, codeless and
bi-directional. All native SharePoint list features are available for
the connected lists, including search, managed metadata, offline and mobile
access, change notifications and workflows. This use case
shows how to connect a native SharePoint list with an Active Directory query result set.
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, search,
attachments, change notifications, workflows to improve your application.
Fig. Create a new custom list, goto
list settings and click "Connect to external data source"
Fig.: Connect the list with an
Active Directory query result via LDAP (or any other provider). You can hide the
connection string in the SharePoint Secure Store, if required.
Fig.: After update you have a native
list with your Active Directory data query results. Please customize the view,
try search when indexed. The list is kept current automatically in background,
- Select the OLEDB Provider to connect to AD via LDAP. The LDAP driver is
- 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://myServer.myDomain.local/DC=myDomain,DC=com' WHERE objectClass='user' AND
- 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). You
can modify the column type later on.
- Use "check mapping" to check, that all list columns are mapped to query
- Press update. There should be something like "xxx items inserted".
- Press update again. There should be no changes if you have selected a valid
- Enable "Background Update" to sync every hour or setup other interval (see
- 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. Create views if required, e.g. grouping by department etc. Use
general search or customize as usual with SharePoint.
- You can add a calculated column to link or display an photo of the person
etc. You can add attachments and other additional "SharePoint only" columns. It
will be kept while updating (if your primary key works).
- You can subscribe to changes with email or RSS notifications, start
workflows on data change.
- You can take offline using Microsoft Outlook.
Known issues and workarounds:
- Error reading from entity 'Active Directory: 'ADSDSOObject' failed with no
error message available, result code: -2147016669(0x80072023).
directly comes from the Microsoft ADS data provider / driver, not product
related. You can google for specific reasons. You may also want to consider
changing MaxPageSize in Active Directory using ntdsutil.exe. See How to view and
set LDAP policy in Active Directory by using Ntdsutil.exe for more
Please also set Page Size Parameter in connection string, e.g. …;
Page Size=1000; …
- The SQL supported by the Microsoft-based data provider is very specific.
This is a known issue and not Layer2 product-related. You can find query samples
in the internet via Google. In case of where conditions don't use "myField IS
NOT NULL" or myField != ''. MyField = '*' could help.
As a next step please register and download the Layer2
Business Data List Connector for SharePoint (free Shareware Edition) or
consult any local reseller and implementation partner (see right margin).