Setup Remote Content Type HUB In SharePoint

Introduction 

 
In SharePoint, most developers must be aware of Content-Type HUB. Some of them also might know how to Create Content Type HUB in the Same Web Application. But here, I have explained how to create a content type HUB on one server and consume it in another sever.
 
Note
Publishing Farm (DEFRAVMDFUSWK83) Consuming Farm (Local Server)
 
Check the following before starting Consuming CTH
 
On Consuming Farm - Central Admin - Application Management - Service Application - Managed Service Application - Select Managed Metadata Service - Publish (in Ribbon) - Click on the link (Click here to add a relationship with another Farm)
 
Note
If any publishing trust presents over there, delete it.
 
Setup Remote Content Type HUB in SharePoint
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
On Publishing Farm - Central Admin - Application Management - Service Application - Managed Service Application - Select Managed Metadata Service - Publish (in Ribbon) - Click on the link (Click here to add a relationship with another farm)
 
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 

Steps To Consuming CTH

 
Creation of Root and STS Certificates on Consuming Farm
  1. In the consuming farm go to the Start menu.
  2. Go to SharePoint2013 Management Shell and select Run as Administrator.
  3. In the command prompt, type each of the following commands.
  4. In the following script put the exact path where you want to store your certificates With proper Certificate Name within Double coats.
  5. Here 022 is added at the end of certificate only for the identity of a specific Certificate on publishing Farm.
    1. $rootCert = (Get-SPCertificateAuthority).RootCertificate  
    2. $rootCert.Export("Cert") | Set-Content "C:\ConsumingFarmRootOS022.cer" -Encoding byte  
To export the STS certificate from the consuming farm:
  1. In the Command Prompt, type each of the following commands
    1. $stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate  
    2. $stsCert.Export("Cert") | Set-Content "C:\ConsumingFarmSTSOS022.cer" -Encoding byte  

Creation of Root Certificate on Publishing Farm

 
Kindly check if the publishing certificate already exists or not on the publishing farm.
 
If it exists, copy that and past it on your local (Consuming Farm) where consuming certificates are already stored.
 
If not, then follow the below steps:
  1. In the Command Prompt, type each of the following commands.
  2. In the following script put the exact path where you want to store your certificate With proper Certificate Name within Double coats.
  3. Here 022 is not added at the end of the certificate because the identity of the Publishing Certificate on Every Consuming Farm is the same.
    1. $rootCert = (Get-SPCertificateAuthority).RootCertificate  
    2. $rootCert.Export("Cert") | Set-Content "C:\PublishingFarmRootOS.cer" -Encoding byte  
Exchange of Certificates within Publishing Farm and Consuming Farm,
  • Copy the Root and STS Certificates from your local Farm to Publishing Farm on the same path where you stored a publishing Certificate.
  • Copy the Root Certificate from your Publishing Farm to local Farm on the same path where you stored Consuming Certificate.
Creating Trust Between Consuming and Publishing Certificates
 
On Consuming Farm - Central Admin -Application Management - Service Application - Managed Service Application -
Select Managed Metadata Service - Publish (in Ribbon) - Click on Link(Click here to add a relationship with another Farm) - New(in Ribbon) -
Name - ( e.g. Publishing)
 
Root Authority Certificate -- (Browse the publishing Certificate)
 
Provide Trust Relationship—(Tick the Checkbox) - - ok
 
Setup Remote Content Type HUB in SharePoint 
 
On Publishing Farm - Central Admin -Application Management - Service Application - Managed Service Application - Select Managed Metadata Service (OS Content-Type Hub) - Publish (in ribbon) - Click on the link (Click here to add a relationship with another)
 
Farm - New (in Ribbon) 
 
Name - ( e.g. DERUSVMDSPWS022)
 
Root Authority Certificate - (Browse the Consuming Root Certificate)
 
Provide Trust Relationship - (Tick the Checkbox)
 
Token Issuer Description - (Keep it Blank)
 
Token Issuer Certificate - Ok
 
 Setup Remote Content Type HUB in SharePoint
 
Setup Remote Content Type HUB in SharePoint 
 
Again go to Select Managed Metadata Service -Publish (in Ribbon) -
 
Content-Type – (HTTP)
 
Publish to other Farm – (Tick the checkbox)
 
OK.
 
Setup Remote Content Type HUB in SharePoint
 
Setup Remote Content Type HUB in SharePoint 
 

Set permissions to published service applications

 
On Consuming Farm run the following script
 
Copy the ID that you get after this command.
  1. Get-SPFarm | Select Id  
On Publishing Farm Run the Following script
 
Paste the ID that you copied in the previous step where you see the blue text in the script within Double coats.
 
$security = Get-SPTopologyServiceApplication | Get-SPServiceApplicationSecurity
$claimProvider = (Get-SPClaimProvider System).ClaimProvider
$principal = New-SPClaimsPrincipal -ClaimType "http://schemas.microsoft.com/sharepoint/2009/08/claims/farmid" -ClaimProvider $claimProvider -ClaimValue <ID Copied from Step 1 Above>
Grant-SPObjectSecurity -Identity $security -Principal $principal -Rights "Full Control"
Get-SPTopologyServiceApplication | Set-SPServiceApplicationSecurity -ObjectSecurity $security
 
On Publishing Farm - Central Admin - Application Management - Service Application - Managed Service Application - Select Managed Metadata Service (OS Content Type Hub) - Permission (in Ribbon) - Enter that Farm ID in the textbox that got in the previous step -Check Names - Add - Tick All the checkboxes under permission for Local Farm - ok.
 
 Setup Remote Content Type HUB in SharePoint
 
Setup Remote Content Type HUB in SharePoint 
 
Again Go to the Managed Metadata Service -Publish (in Ribbon) -Copy the Publish URL.
 
 Setup Remote Content Type HUB in SharePoint
 
Setup Remote Content Type HUB in SharePoint 
 
On Consuming Farm------------------ -Central Admin -Application Management - Service Application - Managed Service Application -Connect(I Ribbon) -Managed Metadata Service Connection -Past the publishing URL that you copied in the previous Step -Ok -OK -OK.
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Now you can see the Connect to OS Content Type Hub in Managed Service Application. Select it - Property (in Ribbon) - Tick All Checkboxes - Ok
 
Setup Remote Content Type HUB in SharePoint 
 
Again, click to Connect to: OS Content Type Hub - Add yourself in Term Store Administrators - Save.
 
Setup Remote Content Type HUB in SharePoint 
 
 
Setup Remote Content Type HUB in SharePoint 
 
Step to Check Default Content Type Hub
 
Central Admin - Application Management - service Application - Configure Service Application Associations - View(Service Application) - Click on Default under Application proxy Group - Now select which metadata service connection you want to set as default and tick the checkbox in front of it.
 
 Setup Remote Content Type HUB in SharePoint
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Central Admin -Application Management - Web Application -Managed Web Application -Select your Web Application -Service connections (in Ribbon) -Tick the checkbox in front of your Managed metadata Connections Wants to be Default.
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Running Timer Job Service – (Subscriber Job)
 
CentralAdmin - Monitoring - Timmer Job -Review Job Definitions - View(Web Application) - Click on Content-Type Subscriber - Run Now.
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
Setup Remote Content Type HUB in SharePoint 
 
We have gone through all the steps and their use/importance in order to set up the Content-Type HUB in a separate server. The steps mentioned here were performed on SharePoint 2013 on-premise environment.