SharePoint News Widget

It’s possible to show content from SharePoint Online within GoBright View. In order to set this up a couple of steps need to be taken within SharePoint Online.

Requirements

  • A SharePoint Online / O365 admin account
  • A client ID
  • A client secret
  • The tenant ID
  • One or more SharePoint site(s) containing at least one news post
Within SharePoint

The first part of the configuration will be done within SharePoint Online.
Make sure that you are logged in with an admin account so the correct permissions can be granted.

Login to SharePoint Online

Create a client ID and Secret

To connect with SharePoint Online we need to register the application.

Grant App Permissions

Permission must be granted so the app can get information from SharePoint.

  1. Open PowerShell as administrator
  2. Copy and paste the code below in a text editor such as Notepad
  3. Fill in the $adminUPN and $orgName variables (between the quotation marks)
    The adminUPN is the admin email address
    The orgName is your SharePoint domain, for example: contoso.sharepoint.com (then fill in contoso as the orgName)
  4. Copy and paste the code in the PowerShell prompt
  5. Run the script

When asked to install the NuGet provider, follow the on screen steps to install the NuGet provider.
When asked to install or update the PowerShell module, follow the on screen steps.

# Install the PowerShell module (this can be skipped when this module is already installed)
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
# Fill in the organisation name below between the quotation marks
$orgName= ""

# Then run this command to connect to SharePoint, log in as a SharePoint administrator
Connect-SPOService -Url https://$orgName-admin.sharepoint.com

# Then run this command to set the right permission
set-spotenant -DisableCustomAppAuthentication $false

Set permission for the specific site

We’ll need to allow GoBright View to access one or more sites. Note that this process must be repeated for each site that needs to be displayed.

Get the Tenant ID

The Tenant ID can be found in the Azure portal.

  1. Go to https://portal.azure.com/ and log in
  2. In the menu on the left, click on Azure Active Directory
    The overview page opens
  3. Under Basic information the Tanant ID is displayed and can be copied

That’s all the information we need from SharePoint, now let’s head over to GoBright View.

Within GoBright View

Add the widget to a template or a slide and fill in all the information that we’ve gathered above in the widget parameters.

Note: the domain should only include the domain before’.sharepoint.com’. For example, if your SharePoint domain is ‘mycompany.sharepoint.com/site/example’, only ‘mycompany’ has to be filled within the parameter.

mceclip0.png

If Site Name is left blank it will show information from the main SharePoint page.

After this information is added you should see the information from SharePoint.

Note that only a single SharePoint Teams site can be entered per widget. If you want to display multiple sites you can add another widget with a different site.

If the message “Something went wrong with retrieving the token” is shown something is wrong with the credentials or tenant id. Make sure the parameters are set correctly.

mceclip0.png

What to do if the widget suddenly stops working

If the SharePoint widget suddenly stopped working and/or this error shows up:

It’s very likely that the Client Secret token has expired. This happens every year due to Microsofts policy. We recommend to set a reminder in your calendar to create a new Client ID / Client Secret a month prior, to prevent down time.

How to get a new Client ID and Secret

Because renewing an existing Client is not possible you will have to create a new one and then use those credentials within GoBright View. You just have to update the credentials in the existing slide(s) that contain the SharePoint widget.

This can be done by performing the steps above.

How information is displayed within the Widget

News items, posts or pages from SharePoint will be shown in the View Widget as shown below.
There are various parameters for text size, colors and display options.
Placeholder images will be shown in the portal. On the devices the actual images are visible.

screenshot-sharepoint-widget.png

Add News items or Site Pages within SharePoint

Due to a limitation of the SharePoint API all news items will be visible in GoBright View, this includes news items which are a concept/draft/not published. We recommend to use scheduling within SharePoint and/or use a filter keyword to have full control over which news items are displayed in GoBright View. More information about this at the bottom of this article.

At least one news item or site page must exist. Otherwise there is nothing to show within the widget.

To add a news item or site page, head over to SharePoint and click + New. Then choose News Post. Follow the wizard to add a post.

mceclip5.png

The title, page description and thumbnail image will be shown within the GoBright View Widget.
To edit these fields, open the Page Details panel. Click Update News if you are done.
The SharePoint Widget within GoBright View automatically updates when a post in SharePoint is added or updatet. There is no need to update the widget within GoBright View.
It is also possible to use a custom field as excerpt. Please read optional settings.

Note: To be sure that images in GoBright View are visible upload them to SharePoint. When using the image search from within SharePoint, results may come from third party sources. This can cause images not showing properly in GoBright View.

Note: SharePoint will use the first text of the page as the description, longer texts will get truncated with ellipsis. It is possible and recommended to edit the description to your needs.

mceclip8.png


Optional settings

Scheduled News Posts

Within SharePoint, news items can be scheduled to go live at a certain date/time. Scheduling is an optional option that can be enabled per SharePoint site.

For more information about scheduling news posts, please read this Microsoft article.

The GoBright View SharePoint News widget recognizes scheduled news items automatically and only display these items from the scheduled date/time onwards.

Only show certain news posts using a filter keyword

The widget parameter Filter on this keyword can be used in combination with a custom SharePoint property to only show items where this property is set. For example: a custom yes/no property called ShowOnSignage.
This way you have complete control over which news posts are visible within GoBright View.

To set this up head over to SharePoint and open the site containing the news posts you want to display within GoBright View and then:

  1. Click on Pages
  2. Click on Add column
  3. Click on Yes/No

mceclip1.png

Fill in the details. We’ll need the name for later within GoBright View.

mceclip2.png

Click Save.

To set this property to Yes:

  1. Click the three dots
  2. Click More
  3. Click Properties

mceclip3.png

Set the property to Yes.

mceclip4.png

Use a custom property as excerpt

It can be useful to show an excerpt of a news post on the digital signage. The default summary field of a SharePoint news post is auto generated and truncated. We recommend to add a custom property and then let the GoBright SharePoint News Widget get it’s text from that property to have full control over the text that is displayed on your signage displays.

To set this up, head over to SharePoint and follow the same steps described above for setting up a Yes/No property. Instead of Yes/No select Multiple lines of text. Again, we’ll need the name within GoBright View.

mceclip5.png

Within GoBright View, go to the SharePoint News widget parameters and fill in the name at Get description from custom SharePoint property.

Don’t forget to fill the excerpt field when adding a news post within SharePoint.

Troubleshooting

Please read the Troubleshooting SharePoint article for more information.

This article comes from the Help Center of GoBright.

View original article

FAQ

Ask us anything! Find the answers to the most frequently asked questions here.

Browse the FAQs

Help Center

A goldmine for all IT and Facility Managers. Dive into the technical stuff concerning our products and solutions.

Visit the Help Center

Newsletter

Wanna stay informed of all developments within the smart office and our new features? Subscribe now.

Subscribe now