Content Hub Connections

Estimated reading time: 4 minutes

Creating a Connection

To use SharePoint or PowerBi in your Content Hub you need to give the NCH permission to fetch content. To do this you first need to create an app in Azure and Connect this to your NCH. After this is done you need to map a Connection in the NCH. The steps below will guide you through this process.

Creating the Azure app

  • Go to https://portal.azure.com/#view/Microsoft_AAD_IAM/TenantPropertiesBlade
  • Copy the Tennant ID and save it for later.
  • Click on Home and search for “Enterprise applications”
  • Open Enterprise applications to start creating the app
  • Click “new Application” -> “Create your new application.” If this option is grayed out your account does not have the permissions needed to create an app. Sign into an admin account that does have these permissions.
  • Give the app a name so you can easily identify what the app is used for
Creating the Azure app

 
Important: Do not select the Netpresenter NEXT application.

  • Click Create, this can take a minute or 2 to be created.
  • Copy the application ID and save it for later.
  • In the left menu go to permissions and click application registration.
  • Add the permissions
permissions

“Power BI – Tenant.Read.All” is needed if you want to add PowerBI as well. It is also possible to add this to the app at a later stage.
The other 3 permissions are needed for the Sharepoint connection.

This completes setting up the Azure app

Creating the Connection in the NCH

Go to your content hub and open Settings > External Sources > Connections. Click the Add new button and complete the form. Select your connection type, SharePoint or PowerBi. If you want to use both you will need to create 2 connections.

You should have the Tenant ID and Application ID stored from the previous steps.The Tenant name is the name of your Microsoft environment. For instance if your URL starts with https://netpresenter.sharepoint.com/ then netpresenter is your tenant’s name.

new connection

Click on connect and save the connection. The connection between SharePoint/PowerBi and the NCH is now complete. And SharePoint or PowerBi can now be used as an External Source.

(Optional) Only allow access to specific Sharepoint sites

When connecting SharePoint to your Azure app, it is not always desired to connect all sites to our Netpresenter Content hub. It is possible to select the sites that you will grant Netpresenter access to. 

App registration 

Add the Site.Selected SharePoint permission to your app instead of Sites.Read.All 

Site selected

Grant permissions with the admin user. 
Take note of the Application ID and name. 

app info

Grant SharePoint site permissions 

Open PowerShell as administrator. 
Make sure you have PowerShell v7.2 or higher. To update, use the following command: 

winget install --id Microsoft.Powershell --source winget 

 Open PowerShell 7 and Run the following command first to install PnP.PowerShell: 

Install-Module PnP.PowerShell 

Then copy the following text. 

$targetSiteUri = 'https://xxxxxx.sharepoint.xom/sites/subsite' 
connect-PnPOnline $targetSiteUri -Credentials AdminUserName 
Grant-PnPAzureADAppSitePermission -AppId 'Azure Application ID' -DisplayName 'Azure Applcation Display Name' -Site $targetSiteUri -Permissions Read 

Make sure to add the correct site URI, App ID and App Name 

Sources 

Information on the PNP Module can be found here: https://pnp.github.io/powershell/