MongoDB Integration with SharePoint

MongoDB data can be integrated and synchronized codelessly with SharePoint on-premises lists using the Layer2 Business Data List Connector. In case you are looking for Online data integration, you will find the right tool here.

 

sharepoint external list settings

 

Figure 1. It's easy to integrate MongoDB data with SharePoint. Just create a list and click "Connect to external data source" in your list settings.

MongoDB Integration with SharePoint - Features & Benefits

 

  • Very easy to setup in a few minutes: Create a new SharePoint list, click "Connect to external data source" in the list settings, select the data provider, enter connection settings and data query as shown below ... that's it.
  • No changes in the MongoDB data source required: No programming, no additional tools.
  • Connected list data always up-to-date: The connected MongoDB data query updates the SharePoint list automatically in background (via SharePoint Timer Job), or alternatively, on-demand (Action Menu / Ribbon Button, URL, via workflow, API).
  • One-way and optional two-way connection: You can write-back the changes made in the SharePoint list to the external data source automatically with full CRUD (Create / Update / Delete) functionality. The SharePoint list can act as a full-featured front-end for external systems.
  • Well-known BCS "external list" issues and limitations are completely solved: ALL list features are to you. Views, sorting and grouping, filters, calculated fields, search, managed metadata. Lookups, additional columns and attachments can be created as normal. All kind of lists can be used, e.g. contacts, tasks, calendar, or custom lists. You can take external data offline via Outlook.
  • Workflows and notifications on external data change: List workflows and change notifications per RSS or email can be used to take business actions in SharePoint, when external MongoDB data records are changed.
  • Application logging, reporting, and notifications: A SharePoint list is used to store settings and log information. SharePoint item versioning and workflows can be used to manage reporting and notifications. Direct notification per email in case of errors is supported as well.
  • Highest Security, best performance, easy to maintain: SharePoint Secure Store can be used to store security relevant configuration information safely in one central place. Users are working with the SharePoint lists as an external data cache with highest security and performance. Large data sources can be synchronized.
  • 100+ more external systems supported: Layer2 Data Providers included (e.g. for external SharePoint or Office 365, Exchange, Dynamics ERP/CRM, OData, XML/RSS, SOAP), vendor specific data providers can be used (e.g. SQL Server Oracle, MySQL etc.), 3rd party data providers also supported, e.g. for custom ERP/CRM, Facebook or Twitter. See here for supported systems and applications.

MongoDB Specific SharePoint List Configuration Settings

 

In the Layer2 Business Data List Connector, the data connection must be configured as follows:

 

Oracle to SharePoint connection

 

Figure 2. Example connection configuration to connect a native SharePoint list to a MongoDB data entity via Layer2 Business Data List Connector.

 

 

  • Install the CData ADO.NET Provider for MongoDB 2017 on each machine in the farm that is running BDLC. This provider is not part of the Layer2 Cloud Connector ADO.NET provider package and should be installed separately from the vendor's product page. It requires extra licensing.
  • Choose “CData ADO.NET Provider for MongoDB 2017” (exact name might vary) as “Data Provider” for your data entity (source and / or destination).
  • Follow the vendor instructions for setting up the connection string and select statement (see below for examples).
  • Set the connection string as required, for example: 
    Server=myServer; Port=myPort; Database=myDatabase; User=myUser; Password=myPassword;
  • Set the data query as required, for example:
    ​SELECT * FROM MyCollection.
  • You must set your own primary key value (usual PK restrictions of 'unique, non-NULL' apply). There's a known issue where BDLC does not detect changes properly without it.
  • Write-back is supported. You can use this to write changes in SharePoint back to MongoDB. Please take care to set appropriate primary keys.
  • The build-in _ID field should not be used as it is auto-generated and will change on write-back of new records, leading to unnecessary deletes and re-inserts.
  • You can map your list columns to specific external data source fields in the Layer2 Business Data List Connector. Please take care about data types (simple type conversions are supported).
  • No programming required for setup a connection and sync.
  • No need to open your local network for access from outside. No 3rd party involved.

 

 

MongoDB Connection Details

Provider:

CData ADO.NET Provider for MongoDB 2017
The exact name of the provider may change over time.

 

Connection String Example:

Server=myServer; Port=myPort; Database=myDatabase; User=myUser; Password=myPassword;

 

Select Statement Example:

SELECT * FROM MyCollection

 

For more information about connection string parameters and appropriate select statements, please see the vendor's provider documentation.

SharePoint Integration with MongoDB - Examples, Known Issues, and Workarounds

There are following known issues and workarounds with MongoDB integration:

 

  • The MongoDB provider supports both legacy MONGODB-CR and SCRAM-SHA-1 (default) authentication methods. If you are using an older version of MongoDB, you may need to define the authentication method in the connection string. See the vendor provider documentation for more information.
  • There seems to be a bug which might lead to values not being associated with the correct properties. It is unknown if this affects the newer provider version. This can be avoided by having one consistent schema per collection.

 

 Ready to go next steps?

Icon for Product Regsitration - Layer2 leading solutions

Register for free download.

Keep your Sharepoint in sync. Download and try today.

Contact Us Icon for Layer2 leading solutions

Questions? Contact us.

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