I am facing Access denied error while performing a SPFx deployment through Azure DevOps. The error says, "Error: Access denied. You do not have permission to perform this action or access this resource". I am using a service account to deploy the sppkg file on App Catalogue, which has Site collection admin permission level, and The account which I am using on dev-ops is my corporate account. I am also able to connect to SPO Online successfully. The command where this error is coming is like this:
o365 spo app add -p $(System.DefaultWorkingDirectory)/_myCI/drop/sharepoint/solution/myspfx.sppkg --overwrite --appCatalogUrl https://$(tenant).sharepoint.com/$(catalogsite) --scope sitecollection
o365 login
before running the app add command? Could you share your devops pipeline? – Levi Lu-MSFTo365 spo app add
to the StepConnect SPO Site
. If you login in your SPO site using a script task. The console session will be closed when the task is completed and that might cause the login session cannot persist in the following steps. – Levi Lu-MSFT