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.
- Patrick RoteFeb 08, 2021Iron Contributor
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" belowAdd-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 $AppFilePathAny 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!