Recently, we were deploying a solution for a client. So for UAT set up, we asked them to create a site collection and activate the site collection level app catalog. The IT admin create the site collection and when he ran below command for creating site collection level app catalog.
Connect-SPOService -Url https://Domain-admin.sharepoint.com/
New-SPOSite -Url https://contoso.sharepoint.com/sites/mynewuatsite -Owner user@domain.com -Title "My new site collection"
$site = Get-SPOSite https://Domain.sharepoint.com/sites/mynewuatsite
Add-SPOSiteCollectionAppCatalog -Site $site
He faced an error:
add-spositecollectionappcatalog : Must have Manage Web Site permissions or be a tenant admin in order to add or remove sites from the site collection app catalog allow list
As the site collection creation didn't give an error, it was sure that he has SharePoint admin access. So, why the site collection level app catalog is giving error.
So, we go to analysis mode and we found out below reason.
Solution:
So, I found out a community discussion on the google about the same issue. Please see reference link for the same.
As per that discussion, user must has site collection admin rights on the Tenant level app catalog to create site collection level app catalog with SharePoint Admin rights.
Once we provided that access, we were able to run the command successfully.
Reference:
- https://github.com/SharePoint/sp-dev-docs/issues/1348