Enable Organization assets on SharePoint Online

Photo by Brett Jordan on Unsplash

When creating new pages with News Post often we don’t know exactly the images. Same happen with some document that you may want your company to have access on when creating the new pages. So a couple of days I cross with the feature on SharePoint Online that allows you to create these
Organization Assets. To enable this, it’s needed to run a couple of cmdlets.

Before using the command below of PnP PowerShell, make sure you have the cmdlets installed on your machine. You can also follow the next article in case you need to install these. Every library that you add as Organization Assets will appear on this section.

NOTE: To create this resource on SharePoint Online you need to be an administrator of SharePoint Online and have the private Office 365 CDN activated for your organization. This resource will be stored only in ONE SharePoint Site collection so before using this, consider your information where you want to store this resources.

PnP PowerShell

$tenantAdminUrl = "https://contoso-admin.sharepoint.com/"
$orgAssetsLibrary = "https://contoso.sharepoint.com/sites/siteName/LibraryName"

$userName = 'Email'
$password = 'password' | ConvertTo-SecureString -Force -AsPlainText
$cred = New-Object -typename System.Management.Automation.PSCredential($userName, $password)

Connect-PnPOnline $tenantAdminUrl -Credentials $cred 

#To check the Organization Assets
#to remove the Organization Assets
#Remove-PnPOrgAssetsLibrary -LibraryUrl "sites/cdn/orgimages"
#To Add to the Organization Assets, You can add -ThumbnailUrl to have an image displaying on the library
Add-PnPOrgAssetsLibrary -LibraryUrl $orgAssetsLibrary  

With the current version of the Office 365 CLI, we can only consult what are our Organization Assets.

Office 365 CLI

o365 login
o365 spo orgassetslibrary list -o json


The final result when adding a web part to a page and selecting an image/document you will see the Your Organization section which will contain this library. Note that you need to beware this gonna be available in all SharePoint sites. In this article – https://mattipaukkonen.com/2019/09/26/sharepoint-organization-asset-libraries-explained/ – you will find great information about this topic if you want to inspect further before activating this option. Another option is to use SharePoint Online Management Shell as described for that consult this article – https://www.c-sharpcorner.com/article/how-to-configure-and-use-sharepoint-online-organization-assets-library/


Leave a Reply

Your email address will not be published. Required fields are marked *