-1

Below are the detailed steps which i am performing for CI CD created pipeline to create spkg.sppkg its successful now in release i am doing below steps

Connect to SharePoint App Catalog (Successful)

o365 login https://naxis007.sharepoint.com/sites/Wipro%20App%20Catalog/AppCatalog --authType password --userName $(username) --password $(password)

Add Solution Package to App Catalog **(getting error access denied in this steps)** 
o365  spo app add -p $(System.DefaultWorkingDirectory)/Test/drop/drop/sharepoint/solution/spfx.sppkg --overwrite --appCatalogUrl https://naxis007.sharepoint.com/sites/Wipro%20App%20Catalog/AppCatalog --scope sitecollection

enter image description here

kumar
  • 59
  • 1
  • 8
  • It's not a question of what role *you* have, it's a question of the role(s) assigned to your service connection's service principal object. That said, please provide more detail - your post cuts off so much information you're forcing people to guess at your problem. – WaitingForGuacamole Mar 01 '21 at 13:32
  • i tried to provide steps please let me know if any further information required – kumar Mar 01 '21 at 15:28

1 Answers1

1

It looks like you were running o365 login command and o365 spo app add command in two separate command line tasks.

Each command line task will open a new terminal window which will be closed when the task is finished. So the login information in the first command line task cannot persist in the second command link task. That's why you got the access denied error.

You should run the o365 login command and o365 spo app add command in the same command line task. So that both the commands will be executed in the same terminal.

Or you can use the task SharePoint Files Uploader to upload the spfx.sppkg file .

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43