Office 365: Active Directory based corporate phonebook in SharePoint Online

 

​The Layer2 Cloud Connector for Microsoft Office 365 and SharePoint connects almost any on-premise data source, e.g. ODBC, OLEDB, OData, Microsoft .NET based providers, Files (Excel, XML, CSV), SQL databases like SQL Server, Oracle, MySQL, IBM DB2, IBM AS/400, IBM Informix, Notes, SharePoint, Exchange, Active Directory, Navision, SAP and many more directly to native SharePoint lists and libraries in the Microsoft Cloud - or any other Microsoft SharePoint installation - in just minutes without any programming. For any questions please use the FAQ Web Form or contact sales@layer2solutions.com directly.

 

 

Integrating local corporate Active Directory data sources with native SharePoint lists (e.g. contacts) in Office 365, SharePoint Online or SharePoint on-premise as employee directory or corporate phone book can close some gaps using Microsoft SharePoint, on-premise or in the cloud. Please note: It's not only about displaying the external AD data - it's about full integration with search, views (e.g. alphabetically grouped), lookups, change notifications, workflows, offline usage, enterprise metadata, attachments etc. Because it is a native contact list in SharePoint you will be able to use this contacts offline, e.g. synced with Microsoft Outlook.

 

This FAQ gives a step-by-step example how to do this.

Prepare your external Active Directory data source to integrate with Office 365

 

Let's take this sample Active Directory organizational unit (OU) to build a corporate Phonebook.

 

office 365 phonebook 1

Fig.: The screen shows a sample organizational unit in local Active Directory to connect with a native SharePoint list in the Microsoft cloud or on-premise for a phone book application.

 

 

Please note:

  • You can use existing subsets, or create direct ADSI queries in the Cloud Connector with "where" conditions etc. later on.

Setup your Active Directory to SharePoint connection

 

​With the Cloud Connector Connection Manager (a MMC snap-in) you have to setup:

1. the connection (uni-directional in this case, scheduling etc.),

2. the data source (your Active Directory) and

3. the data destination (in SharePoint on-premise, SharePoint Online or Office 365. The list must be created manually before. Lets use a contact list in this case).

 

You can use auto mapping to connect the fields of both data entities by name or map fields manually.

 

See here for sample connection settings:

 

office 365 phonebook 2

Fig.: Sample Active Directory to Office 365 uni-directional connection.

 

Please note:

  • Bi-directional connections are not supported by the Microsoft OLEDB ADSI provider used.
  • Please enable scheduling later on, when all settings are verified and you have an idea of replication duration. Duration time depends on bandwidth, performance of source and destination, and number of fields and records in SQL. Only changes are transferred later on.

 

Before running the connection, you have to define the data source and destination.

 

office 365 phonebook 3Fig.: The pre-installed Microsoft ADSI Provider is used to connect to the data source with a connection string.

 

 

Please note:

  • Please select the OleDb Data Provider in this case and refer to ADSDSOObject later on.
  • See here for more information about ADSI connection strings. Please verify the connection.
  • Please note the page size parameter in connection string for longer lists. In some cases it must set for the AD as well to work as expected.
  • See here for more about ADSI queries. A valid query can look like this:

    SELECT displayname, title, name, objectSID, ADSPath, givenName, sn, cn, company, department, l, mail, telephoneNumber From 'LDAP://myserver.mydomain.lokal/OU=MyOU,OU=Users,OU=MySubOU,DC=MyDomain,DC=lokal' WHERE objectClass='user' AND objectCategory='Person'

    Please verify the select statement. If there are any issues, please check your access rights first. Start with a very basic query and increase complexity step-by-step.
  • Select as few fields as required to increase performance.
  • Use the data preview to check out the result of your query.
  • Include the unique ADSPath field in your query and use it as a "primary key".
  • Please verify all settings before save.

 

Next you have to define your data destination:

 

office 365 phonebook 4

Fig.: Data destination sample, a list "AD-Phonebook" in the Office 365 cloud.

 

 

Please note

  • Use the Layer2 SharePoint CSOM Provider to connect to SharePoint on-premise, SharePoint Online or Office 365.
  • You have to create the destination list manually with all columns required to host your query data. Please use a contact list in this case to benefit from default fields and Office integration later on.
  • Read more about connection strings to connect to Office 365, SharePoint Online or SharePoint on-premise here. Please note that you can connect to any other type of data destination, e.g. to SQL databases, as well.
  • There is no need to enter a primary key, the provider automatically uses the SharePoint item ID.

 

As a last step you have to setup the column / field mapping. You should map manually in this case because of the different field names in source and destination.

 

office 365 phonebook 5

Fig.: Sample field / column mapping of data source and data destination.

 

 

  • Please note the mapping of SN to Title, as a SharePoint contact list requires a Title field.
  • Please note the difference in data types. The Cloud Connector tries to match as close as possible.

 

If all settings are verified, please go to connection root and run the connection manually first. Please note, that it could take some time to transfer all nodes. You can take a look in your cloud list to see how it goes on. 

Manage your Active Directory data in the Office 365 SharePoint contacts list

 

Now take a look at your list. All items are in there, after running the connection.

 

office 365 phonebook 6

Fig.: Sample data destination contact list in the Office 365 cloud.

 

 

Please note:

  • We have added a calculated column "Letter" with text data type and set to Left([LastName],1).
    In the view we group to this letter column.
  • Please note that the contact items are fully integrated in SharePoint search. It's easy to create a custom search application for this list only, if required.
  • Changed items are transferred only on next scheduled update. That means, you can setup change notifications per-email or workflows in the cloud without any restrictions. For example you can send notifications about new employees, or show a feed of changed entries.
  • You can add additional "SharePoint only" data, such as attachments (e.g. picture) or managed metadata. It will be kept while items are updated.
  • You can do anything you can generally do with a SharePoint list - without any restrictions (e.g. search).
  • You can sync the contacts for offline usage in Outlook.

 

office 365 phonebook 7

Fig.: Corporate contacts based on Active Directory can be distributed to the Outlook clients for offline usage via the Microsoft Office 365 cloud

 

 

Don't forget to finally setup the background update, to keep data current in connection settings, e.g. with scheduled updates every hour or daily. To manage one connection only, the Personal edition is enough. You can have as many connections as you want with the Professional Edition, e.g. internal and external lists, in SharePoint on-prem or Online etc.

 

Known Issues:

  • Error reading from entity 'Active Directory: 'ADSDSOObject' failed with no error message available, result code: -2147016669(0x80072023).
    The message 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 details.
    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.

Next steps: Download a FREE shareware edition of the Layer2 Cloud Connector

 

​You can download a free shareware edition of the Layer2 Cloud Connector for Office 365 and SharePoint after registration here.

Ready to go next steps?

Register for free download.

Keep your Sharepoint in sync. Download and try today.

Questions? Contact us.

We are here to help. Contact us and our consulting will be happy to answer your questions.