Overview

Managed metadata service application in SharePoint is primarily used to set up a taxonomy for representing hierarchical business information. It also supports to set up a content type hub which centralizes the content types used across the sites.

In this article, we will explore how we can setup hybrid content types. Also, we will configure synchronization between cloud and on-premises content types.

SharePoint Hybrid Content Types

The SharePoint hybrid content types help to maintain a single set of content types across SharePoint on-premises server and SharePoint online. The shared content types are maintained at SharePoint online and it’s a read-only copy which is maintained at SharePoint on-premises server. The hybrid content type propagates the updates from SharePoint online to SharePoint on-premises server.

Content Type Hub in SharePoint Online

Content type hub in SharePoint Online is a predefined site collection. Follow the below steps to locate your content type hub.

1. Open SharePoint online root site.

2. Navigate to site settings.

3. Under Site Collection Administration, click Content type publishing.

4. Under Hubs section, the content type hub url for tenant is listed along with subscribed content types.

5. Click the hub url to navigate to site content types page of content type hub.

6. Create a new content type.

7. Now, let’s add existing site columns to our content type.

Copy SharePoint Server Content Types to SharePoint Online 

To configure hybrid content types, we should first copy the existing content types in SharePoint on-premises server to SharePoint online.  We can select set of content types to start with.

Consider an example that below content type exists in SharePoint Server on-premises.

Copy Content Types

Copy-SPContentTypes PowerShell cmdlet helps us to copy the content types from SharePoint on-premises to SharePoint online. 

1. Open SharePoint 2019 Management Shell with administrator privileges.

2. Run below command to capture credentials to connect to SharePoint online.

$credential = Get-Credential

3. Run below command to copy content types from SharePoint Server on-premises to SharePoint online.

Copy-SPContentTypes -LocalSiteUrl http://localsite/

-LocalTermStoreName "Managed Metadata Service Application "

-RemoteSiteUrl https://contoso.sharepoint.com/

-ContentTypeNames @("ContentTypeA", "ContentTypeB")

-Credential $credential

Parameters specified are as follows:

  • LocalSiteUrl: URL of the SharePoint Server on-premises site where your taxonomy store is located.
  • LocalTermStoreName: Name of managed metadata service application in SharePoint Server on-premises.
  • RemoteSiteURL: URL of SharePoint Online site where term store is located (https://<TenantName>.sharepoint.com).
  • ContentTypeNames: Content types in SharePoint Server on-premises to be copied to SharePoint online.
  • Credential: Office 365 global administrator credentials.
Example:

Copy-SPContentTypes -LocalSiteUrl http://portal.contoso.com

-LocalTermStoreName "Managed Metadata Service Application"

-RemoteSiteUrl https://contoso.sharepoint.com

-ContentTypeNames @("SP OnPrem Vendor")

-Credential $credential

Once the PowerShell cmdlet is run successfully, the SharePoint server on-premises content types will be copied to SharePoint online.

Configure hybrid SharePoint Content Types

The next step is to set up the hybrid connection, which will allow replication from SharePoint online back to SharePoint server on-premises. Follow the below steps to download and run a hybrid picker tool.

1. Open SharePoint 2019 Central Administration site.

2. Click the link from green tool-tip “Click here to enable Hybrid experiences.”

3. An executable file “HybridSPSetup.exe” will be downloaded to the file system.

4. Double click HybridSPSetup.exe to install.

5. The wizard will open to connect your on-premises SharePoint Server farm with your Office 365 tenant. Click Next.

6. In order to set up a hybrid environment for SharePoint or OneDrive for Business (OD4B), we need to provide administrator credentials for both SharePoint Server and Office 365. Click Next.

7. Pre-requisites check report will be generated. 

In case of any errors regarding SPO365LinkSettings cmdlet, please follow below steps and re-run SharePoint Hybrid Configuration Wizard.

  • Open SharePoint 2019 Management Shell with administrator privileges.
  • Run below command

Set-SPO365LinkSettings -MySiteHostUrl "http://mysites.contoso.com" -RedirectSites $true

8. Install the default features available in hybrid environment wizard. The configuration wizard will run.

9. After the successful run of the hybrid configuration wizard, the SharePoint server environment will be connected to Office 365.

10. Select Hybrid taxonomy and content type. 

11. Click Input parameters.

In the Local Site URL, specify SharePoint server on-premises site url.

In the Local Term Store Name, specify SharePoint server on-premises managed service application name.

Check the box for Hybrid content type

In the Remote content type, specify the SharePoint online content types to be used for the hybrid. If kept blank, all the SharePoint online content types will be replicated to SharePoint server on-premises.

12. Click Validate.

13. Once validation is successful, click OK.

14. Click Next. The hybrid configuration wizard will run.

15. On a successful run of SharePoint hybrid configuration wizard, the configuration summary will be shown.

16. Click Close.

17. Perform IISReset on SharePoint server on-premises.

Timer Job

Now, return back to SharePoint on-premises site, verify if content types from SharePoint online are replicated. Mostly they are not replicated, because hybrid content types run as a SharePoint timer job.

1. Open SharePoint 2019 central administration.

2. From the left menu, click Monitoring.

3. Under Timer Jobs, click Check job status.

4. From the left menu, click Job Definitions.

5. Find and select the timer job named “Content Type Replication”.

6. Run the timer job by clicking “Run Now”.

7. From left menu, click Running Jobs. Wait for the timer job to finish running.

Verify Content Types Replication

  1. Open SharePoint on-premises site.
  2. Navigate to site settings.
  3. Under Site Collection Administration, click Content type publishing.
  4. Content type hub from SharePoint online will be listed.

Summary

The SharePoint hybrid content types help to maintain a single set of content types across SharePoint on-premises server and SharePoint online. Hybrid content type replicates the content types directly to SharePoint on-premises site collection rather than to content type hub.