Configure CMIS in SharePoint 2016

configure CMIS in SharePoint 2016

In this post, we’ll explain how to configure CMIS In SharePoint 2016 Step by Step. also, we will list the prerequisites of connecting Content Management Interoperability Services (CMIS) in SharePoint 2016.


What’s Content Management Interoperability Services (CMIS)?

Content Management Interoperability Service is a web service standard that allows different content management systems to inter-operate seamlessly over the Internet.

What’s SharePoint Content Management Interoperability Services (CMIS) Procedure Feature?

The Content Management Interoperability Services (CMIS) Producer is a SharePoint feature that allows the applications to interact with SharePoint document libraries programmatically by using the interfaces that are defined in the CMIS standard.

Configure CMIS In SharePoint 2016

Supported SharePoint Versions for CMIS

CMIS is supported with the below SharePoint versions:

  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.

Note: CMIS in not supported in SharePoint foundation 2013 and SharePoint foundation 2010.


Configure CMIS in SharePoint 2016 Step By Step

Supported and Unsupported Features

Before we getting started to use and configure CMIS in SharePoint 2016, you should first be aware of the below CMIS considerations:

  • CMIS is NOT supported in SharePoint Online.
  • CMIS is ONLY supported in SharePoint Server on-premises.
  • SharePoint list is NOT supported in the SharePoint CMIS Producer.
  • Document Library is ONLY supported as a CMIS Repository in SharePoint.
  • By default, CMIS is turned off on in SharePoint Server on-premises.
  • To configure CMIS in SharePoint 2016, you must first activate Content Management Interoperability Services (CMIS) Producer feature.
  • Basic authentication is required to can use and configure CMIS in SharePoint 2016.
  • CMIS supports HTTP and HTTPS.
  • CMIS 1.1 is NOT supported in SharePoint.
  • CMIS connector only supports en-US language Pack.

Configure CMIS in SharePoint 2016 Prerequisites

To use and configure CMIS in SharePoint 2016, you should first do the below prerequisites:

  1. Check SharePoint server availability and accessibility form the destination environment.
  2. Enable Basic Authentication for the SharePoint Web Application.
  3. Activate Content Management Interoperability Services Producer Feature on the SharePoint site.

Check SharePoint Server Availability and Accessibility

At the client machine that will be used to consume SharePoint 2016 CMIS service, you must make sure that:

Enable Basic Authentication in SharePoint Web Application

As we earlier mentioned, you should first enable Basic Authentication for the SharePoint web application to avoid any Unauthorized Exception when you call the CMIS REST.

Steps

  • Open Central Administration > Application Management > Manage web application.
  • Click on your web application >  from the above ribbon, Click on Authentication Provider.
  • Click on Default > at IIS Authentication Settings > Check Basic authentication (credentials are sent in clear text)
Enable Basic authentication in SharePoint 2016

Activate Content Management Interoperability Services Producer Feature

After enabling the basic authentication, you should activate Activate Content Management Interoperability Services Producer Feature as the following:

Steps

  • Open your site > Site Settings > Site Actions > Manage Site Features.
  • Search For Content Management Interoperability Services Producer Feature.
  • Click on Activate.
Activate Content Management Interoperability Services (CMIS) Procedure Feature in SharePoint 2016

Get Repositories and Get Repository Info Services

After activating Content Management Interoperability Services Producer Feature , you’ll be ready now to consume the SharePoint CMIS Services:

In this section, we’ll describe the below main CMIS services in SharePoint:

  1. Get Repositories.
  2. Get Repository Info.
  3. Get Content Stream.

getRepositories

getRepositories gets all the valid document libraries (repositories) in the current SharePoint site.

getRepositories CMIS URL
: http://Site URL/_vti_bin/cmis/rest?getRepositories

getRepositoryInfo

getRepositoryInfo gets a specific document library repository info by its GUID.

getRepositoryInfo CMIS URL
http://Site URL/_vti_bin/cmis/rest/[repositoryid]?getRepositoryInfo

getContentStream

getContentStream gets the content stream for the specified Document object, or gets a rendition stream for a specified rendition of a document or folder object.

getContentStream CMIS URL
http://Site URL/_vti_bin/cmis/rest/repo_id?getContentStream&objectid={your object id}

Test and Use CMIS In SharePoint 2016

Using Postman tool, you can test the CMIS services in SharePoint 2016 as the following:

Steps

  • Open the Google Chrome > At Extension Search for Postman extension.
  • Add it > then login with the Google account.
  • Add the CMIS REST Service URL "http://your site URL/_vti_bin/cmis/rest?getRepositories"

Note: you can also use CMIS web service URL http://SharePointSiteURL/_vti_bin/cmissoapwsdl.aspx

  • Set the Authorization type to basic > set the SharePoint username and password.
  • Click on Send, to see the response.
Test CMIS in SharePoint 2016

Get Documents from Document Library using CMIS in SharePoint 2016

You can use CMIS REST Service to get the repository info from SharePoint Document Library as shown below:

http://SiteURL/_vti_bin/cmis/rest/[repositoryid]?getRepositoryInfo

Where [repositoryid] is the GUID of the document library.

Get Document Library GUID in SharePoint using PowerShell

To get the Document Library Guid in SharePoint, you should run the below PowerShell:

PS C:\Users\melqassas> $web = Get-SPWeb http://SiteURL/
PS C:\Users\melqassas> $lib = $web.lists | Where-Object {$_.title -eq "CMIS Lib"}
PS C:\Users\melqassas> $lib.id
Guid
----
f2d54d2f-7347-430e-88fa-7ebd2a4ca319
PS C:\Users\melqassas>

The CMIS service URL to get getRepositoryInfo should looks like the below:

http://siteURL/_vti_bin/cmis/rest/f2d54d2f-7347-430e-88fa-7ebd2a4ca319?getrepositoryInfo
getrepositories in SharePoint 2016 Doc Library via CMIS

Troubleshooting CMIS In SharePoint 2016

In this section, we’ll try to list the common CMIS errors that you may face when you use CMIS in SharePoint 2016.

CMIS: HTTP/1.1 404 NOT FOUND

When you call CMIS service, you may get “404 NOT FOUND” error. In this case, you should make sure that

  • You have configured CMIS in SharePoint 2016 properly as we mentioned in this article.
  • You are using the correct CMIS URL http://your site URL/_vti_bin/cmis/rest?getRepositories

CMIS: This site can’t be reached

In the client machine, if you tried to browse the CMIS service URL, you may get “This site can’t be reached” error. In this case, you should make sure that you have configured the SharePoint for public use properly. Please, review Check SharePoint Server Availability and Accessibility.

CMIS: Unauthorized HTTP 401

If you get “Unauthorized HTTP 401“, you should make sure that you have enable the Basic Authentication. Pleases review Enable Basic Authentication in SharePoint Web Application.

CMIS: Can’t upload large document size

You can’t upload large document using CMIS although you can upload the same document using SharePoint directly.

To solve this issue, you should edit the “maxRequestLength” attribute value in the SharePoint web.config file.

increase maxRequestLength in SharePoint web config file

Applies To
  • SharePoint 2016.
  • SharePoint 2013.
Conclusion

In conclusion, we have learned

  • How to configure CMIS in SharePoint 2016?
  • What’s Content Management Interoperability Services?
  • What’s SharePoint Content Management Interoperability Services (CMIS) Procedure Feature?
  • Configure CMIS in SharePoint 2016 Prerequisites.
  • Get Repositories in CMIS.
  • Get Repository Info in CMIS.
  • Test CMIS In SharePoint 2016.
  • Troubleshooting CMIS In SharePoint 2016.
You may also like to read
Have a Question?

If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.

Leave a Reply