I'm attempting to create an organizational assets library for use with company branded templates and copilot features.
I have successfully run this code on my development tenant, but when attempting to run the same code in our production tenant, I receive this error:
This library is not on the site that contains other organization asset libraries.
I've tried this on multiple site collections and even created a new communication site, but the error persists.
# Install and import the PnP PowerShell module Install-Module -Name PnP.PowerShell -Force -AllowClobber Import-Module -Name PnP.PowerShell -Force # Connect to SharePoint with MFA $authUrl = "https://<siteurl>.sharepoint.com/sites/OrgAssets"; $pnp = Connect-PnPOnline -Url $authUrl -Interactive $libraryUrl = "https://<siteUrl>.sharepoint.com/sites/OrgAssets/Assets" Get-PnPOrgAssetsLibrary #$test = Get-PnPOrgNewsSite -Connection $pnp #Remove-PnPOrgAssetsLibrary -LibraryUrl $libraryUrl Add-PnPOrgAssetsLibrary -LibraryUrl $libraryUrl #-CdnType Private -OrgAssetType OfficeTemplateLibrary # Disconnect from SharePoint Disconnect-PnPOnline
Get-PnPOrgAssetsLibrary? Do you see any existing org asset library from "another" site?