Last Updated on November 9, 2022 by rudyooms
This time a simple and short blog. It will be about what options you have when you want to deploy your Office templates to your users. Again after a question on the TechNet community, I decided to dedicate a blog to this topic.
When migrating to a modern workplace you will probably move your data to SharePoint but how are you going to make sure all users have the Office templates available?
We have got 2 options.
- Configuring a SharePoint Asset Library
- Configuring OneDrive to Automount a team site and specify the workgroup template
Option 1. Create an organization assets library online
The first option I am mentioning would be to make use of the Office 365 CDN (Content Delivery Network) capabilities. You can use the built-in Office 365 Content Delivery Network (CDN) to host static assets to provide better performance for your SharePoint Online pages. The Office 365 CDN improves performance by caching static assets closer to the browsers requesting them, which helps to speed up downloads and reduce latency
As shown above, there are 2 kinds of CDN in Microsoft 365:
Private Origin: The content published on the CDN requires authentication from users accessing the content.
Public Origin: The content published on the CDN is anonymously accessible.
For SharePoint Org. assets libraries, the default CDN used is the private one. You really don’t want to use the public CDN , because you want to make sure your Office Templates are only accessible by logged-in users.
So in the next steps, we are going to publish the SharePoint Asset Libraries to the Microsoft 365 CDN: Our libraries are going to be identified as “Origins” for the CDN
Step 1: Create a new Site
For the first step, we need to create a new dedicated SharePoint communication Site. Make sure you give it a good name, so everyone knows what’s for. Please note when choosing the second option you also need to do this!
We are going to make sure our Word/Excel and Powerpoint templates are copied into this SharePoint Site.
All your Office Template must be uploaded with an “Office Template” format:
- potx for PowerPoint
- dotx for Word
- xltx for Excel
Make sure you share the site with everyone who needs the templates and gives them only read permissions!
Now we have everything configured, it’s time to start Powershell to create the asset library
Install the Sharepoint Online Management shell:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect to the SharePoint admin center of your tenant
Create the Office Template Library
Make sure you have copied the absolute path from the SharePoint site you have created
Add-SPOOrgAssetsLibrary -LibraryUrl “https:// tenant.sharepoint.com/sites/office %5Ftemplates/wdvdcloud” -OrgAssetType OfficeTemplateLibrary
Of course, the above command is an example you must change the tenant id and site url to your own template location
If it is the first time you add a SharePoint Online Organization Assets Library, PowerShell will prompt you it will turn on the CDN capabilities on your SharePoint Online tenant. You’ll have to agree by entering “Y”.
When you want to confirm if the asset library has been created you could type the Get-SPOOrgAssetsLibrary command.
And if you really want to be sure it’s private, you can check it out with this command line Get-SPOTenantCdnOrigins -CdnType Private
Please note: this first option only works in desktop apps and PowerPoint Online only. When you want to use it in PowerPoint online you will need an Office E3 or E5 license. I can’t find any official Microsoft documentation you will need to have an Office 365 license when you only want to use the desktop apps.
Another Note: Please be very very patient. It took a really long time for my tenants before it appeared in the Desktop Apps
PowerPoint Online (please beware of the license requirements)
Office Desktop Apps
Troubleshooting the Library creation
When creating a new Sharepoint Office template library you could end up with an error mentioning:
“this library is not located on the site that contains other assets library of the organization”
If that’s the case, you need to make sure you run the get-spoorgassetslibrary first to determine if there are any old library leftovers
As shown above, if there are any left overs, you can delete them with the use of the remove-spoorgassetslibrary command
Option 2. Manually with Onedrive and Automount
When we are choosing this option we also need to create a new Site and add the templates to it, just like you did with the first option!
After you have created a new site and have given the right permissions and shared it we can go forward.
Are we going to map it with Teams automount setting Intune or use the PowerShell script option? if choosing the Intune option please make sure you have read my blog about how to change the timer automount setting and how to build the value you will need to automount the site!
Another possibility would be to create a PowerShell script and deploy it to our users (please make sure you aren’t blocking PowerShell and configure the organization display name correctly)
I rather work with build tools in Intune, so I skipped the PowerShell script and just configured a team site to mount in Onedrive. So now we are for certain the Sharepoint site will be mounted with Onedrive, it’s time to set up the workgroup templates path. Create a new settings catalog profile and search for “workgroup templates path”
Please notice the %userprofile% is used, to be sure it’s working for everyone.
After the policy has been deployed to your device open word and create a new document. You will notice the library has been added.
You could also open the file locations settings in the advanced settings to determine if the policy has been applied.
Moving to a full cloud solution will also mean you sometimes need to be creative to make sure your users can still do their job. Migrating your office templates to a cloud based version is way better than the OneDrive method! Once deployed you are good to go