Using the SharePoint Online Content Type Hub

A Content Type in SharePoint is sort of a framework for an item. There are many built-in Content Types, such as Document, Event, and Task. Each Content Type has a set of columns which every item of that Content Type can use. You can create custom Content Types built off of any of the existing Content Types – such as a Purchase Order Content Type based on a Document Content Type with other custom columns added. A full discussion of SharePoint Content Types is beyond the scope of this article, but you can learn more in general about content types in this Microsoft article…. here we’re going to assume you want to use a custom Content Type, and you want to make it available to many sites in your SharePoint environment. The way to do this is to use the Content Type Hub.

This article walks you through using the SharePoint Online Content Type Hub to create and publish a content type for use throughout your tenant. This gives you a consistent structure for items of a specific type.

SharePoint Online Content Type Hub

Unlike when setting up a Content Type Hub in SharePoint on-premises, where you’re creating your own Site Collection to become the hub, SharePoint Online has provided it for you at this URL: https://YourTenant.sharepoint.com/sites/contenttypehub

Once you’re in the Content Type Hub, if you go to Site Settings > Site Collection Features, you’ll see that the “Content Type Syndication Hub” feature is already activated for this URL (unlike SharePoint on-premises). You also don’t need to go to the Managed Metadata Service in the Tenant Administration area, to add the Content Type Hub URL or to configure the consumption of Content Types from the hub – this is already done for you.

Content Type Hub walkthrough

In this walkthrough, I’ll create and publish a custom content type to store Tweet data in custom lists via Microsoft Flow (which I’ll walk through in an upcoming post). To create a new content type in the Content Type Hub Site Collection, go to Site Settings > Site Content Types > Create.

 

 

Below, I’ve created a Tweet content type in the Custom Content Types group (based on the Item content type) within the Content Type Hub Site Collection.

I want to be able to use this content type in a number of lists throughout my SharePoint Online tenant, so I need to publish it. On the settings page for the new Content Type, click on Manage publishing for this content type. As it’s a new Content Type which hasn’t yet been published, the Publish option is already selected (and you can’t change it), so click OK. If I make changes to this content type later, this is where I would republish it.

Next, go to the Site Collection Administration on a Site Collection where you wish to use the new Content Type (Site Settings > [Site Collection Administration] Content Type Publishing), and enable the checkbox to “Refresh all published content types on next update”. Click OK.

This will update all published Content Types the next time the Content Type Subscriber timer job runs. This may take up to about 4 hours, from what I’ve read. After the update, I can see that this Site Collection is subscribed to the Tweet content type:

And now, I can see my Tweet content type in the list of Site Content Types in the subsite where I wish to use it (in this case, my Demo site):

I can now (for example), create a custom list for tweets about a specific event, enable management of content types on that list (under Advanced Settings), and use my Tweet content type. I can do this on multiple lists, and have a consistent structure for each list, which will allow me to use a consistent Flow, and to be able to successfully aggregate the lists if I wish.

NOTE (January 2017 edit): Unfortunately, I’ve found that (at this point anyway) Content Type Hub syndication doesn’t work for Site Collections created via the creation of O365 Groups. For example, if I create a new “Modern” Team Site by first creating an O365 Group, although the Content Type Publishing option is there under Site Settings, it doesn’t seem to actually ever receive Content Types from the Hub. Normally in SharePoint Online, any new Site Collection will automatically have the published Content Types available. There is a User Voice item regarding this, if you’d like to go vote for it…

NOTE: The behavior and screenshots documented in this post were current as of November 2016, and with the addition of my January 2017 update. Things may be different at a later date.

No comments yet.

Leave a Reply

Your email address will not be published.

Pin It on Pinterest