Forum Discussion
Error when using trying to publish/deploy spfx package to Apps catalog in a site collection
- Feb 08, 2021Do you have access to the Global App Catalogue as Admin? If no, that's the cause of your access denied error
Patrick Rote Are you a Site Collection Admin? Also, try leaving the "AppCatalog" off the url in the Connect-PnPOnline command script. If the site app catalog was created via PowerShell or by adding it in the UI with the App Catalog template, the Site Collection knows where to deploy.
Don Kirkham thanks for the response
Yes i am a site collection admin
Correct as you can see in my script the second option had Connect-PnPOnline had the AppCatalog off the url but still getting the error here.
The error is on the line - "+ $App = Add-PnPApp -Path $AppFilePath" below
Add-PnPApp : {"error":{"code":"-2147024891,
System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to
perform this action or access this resource."}}}
At C:\\AddPackage.ps1:9 char:8
+ $App = Add-PnPApp -Path $AppFilePath
Any thoughts?
- Feb 08, 2021Do you have access to the Global App Catalogue as Admin? If no, that's the cause of your access denied error
- Sdoodly777Jun 05, 2023Copper ContributorFaced the same error and this worked Juan, thank you!
- Patrick RoteFeb 16, 2021Iron ContributorSpot on and thats was the issue
- Patrick RoteFeb 09, 2021Iron ContributorThanks Juan.
Good point . Will confirm