Categories
Microsoft 365

Handle templates for Office 365

This is topic has always been a headache. You have your corporate Office-templates hidden away on some on-prem file-share which only a few people have access to. This makes it a bit tricky when we are in world where your devices might not be on-prem anymore, both physically and where they are managed. This gets even more painful when you want to get the templates out to Mac devices.

Of course, there are ways to make use of the old settings where you point out a file share, which could theoretically also live in an Azure blob.

I came from this in the mindset “there has to be something better and cloud ready”. Lo and behold, there is something native to SharePoint we could use!

This concept is more based around the logged in user in the Office suit rather than specific settings on the device. This means that you could also provide unmanaged/external devices with your templates if you have contractors or similar who are using their own devices.

You can read more here about the concept and the limitations (Microsoft Docs).

SharePoint organization assets library

What I found was the organization assets library feature in SharePoint which you can utilize to point out your assets like templates but also images.

This whole setup is based around document libraries on a SharePoint site which you give all your employees reading access to. You can then give restricted access on certain folders if not everyone should see all templates (it’s basic SharePoint access management on folders). This also make it possible for you to assign higher access to people who are responsible for producing templates and they could potentially manage this them self.

One thing which is important to take notice of is that this will create the asset library tenant wide meaning all your users will have this showing up in the Office suite.

Step one – SharePoint site

Create a document library on a new or existing SharePoint site which you will use as your asset repository. My Document Library is called “Office Templates”

Add “Everyone except external” to the visitors access group on your library and give them “Read only” access.

Add some folders and/or templates to your SharePoint library, make sure that they are in a .dotx/.potx/.xltx to work as proper template.

Step two – Configure library

First step is to install the SharePoint Online Management Shell in PowerShell. Detailed information can be found here. In order to invoke this part you will need to be at least a tenant administrator in your Office 365 environment.

Open an elevated PowerShell session and run:

Install-Module -Name Microsoft.Online.SharePoint.PowerShell

To connect to your SharePoint Online infrastructure you will need to run this command where you replace [tenant] with the name of your tenant:

Connect-SPOService -Url https://[tennant]-admin.sharepoint.com

Next up is to specify the asset library:

Add-SPOOrgAssetsLibrary -LibraryUrl  https://[tenant].sharepoint.com/sites/[Site name]/[Document library name] -OrgAssetType OfficeTemplateLibrary -CdnType Private

When you have successfully executed those few PowerShell lines, you are done and within a few minutes the templates will show up in your users Office clients.