SharePoint Online: How to Create Organization Assets Library?

As its name suggests, the Organization assets library is a centralized location for storing your organizational assets such as images, logo, template, etc. to it makes it easier for users to access them across all the sites when creating new pages.

You can add multiple libraries (up to 30 as of today!) as an organization asset library and every library that you add will appear in this section (However, all organization asset libraries should be from the same site!). When you try to insert an image to any Sharepoint Online page, the file picker page gives us an option to insert an image from the Web, OneDrive, upload a file, site collection, etc. Once you add an organization asset library, users can select "Your organization" in the left pane to browse the libraries you've specified.
sharepoint online organisation assets library
Make sure you have updated the PowerShell module before running these cmdlets.

How to Create an Organization Assets Library in SharePoint Online?
Create a new document library or use any existing document library from your SharePoint Online site. E.g. Here in my case, I'm going to use "Site Assets" library from my branding site collection to ensure the corporate brand guidelines for images, https://crescent.sharepoint.com/sites/branding. I've uploaded an image logo.png for the Tile image in File Picker. Here is how to create a new organization assets library using SharePoint Online Management Shell.
#Config Parameter
$AdminSiteURL= "https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/branding"
$LibraryUrl = "https://crescent.sharepoint.com/sites/branding/SiteAssets"
$ThumbnailURL = "https://crescent.sharepoint.com/sites/branding/SiteAssets/Logo.png"    

#Get credentials to connect
$Credential = Get-Credential
 
#Connect to SharePoint Online services
Connect-SPOService -url $AdminSiteURL -Credential $credential

#Create Organization Asset Library
Add-SPOOrgAssetsLibrary -LibraryUrl $LibraryUrl -ThumbnailUrl $ThumbnailURL

Run the above script, Click on "Yes to All" to confirm the prompts that enable CDN. This should give you the "Document library added successfully" message on the screen. If you are enabling CDN for the first time, it takes about 15 min to complete that configuration. You can check the status of the CDN configuration with:
Get-SPOTenantCdnOrigins -CdnType Private
If you get "(configuration pending)" message, you have to wait! Once completed, you can find the organization asset libraries under the "Your Organization" tab.
organization assets library SharePoint online
Here are some cmdlets to help you:
  • To get all organization assets libraries in SharePoint Online, use:
    Get-SPOOrgAssetsLibrary
  • To update organization assets library's properties such as thumbnail image, use:
    Set-SPOOrgAssetsLibrary
  • To remove an organization assets library, use:
    Remove-SPOOrgAssetsLibrary 

Add Organization Assets Library SharePoint Online using PnP PowerShell:
Here is the PnP PowerShell to add an organization asset library.
#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/branding"
$AssetsLibraryURL = "https://crescent.sharepoint.com/sites/branding/Assets"
$ThumbnailUrl = "https://crescent.sharepoint.com/sites/branding/Assets/Logo.png"

#Connect to SharePoint Online
Connect-PnPOnline $SiteURL -Credentials (Get-Credential)

#Add Organization Asset Library
Add-PnPOrgAssetsLibrary -LibraryUrl $AssetsLibraryURL -ThumbnailUrl $ThumbnailUrl
Other PnP PowerShell cmdlets:

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.