pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

Add-PnpApp throws Object reference not set to an instance of an object #1853

Open lisandrogreco opened 5 years ago

lisandrogreco commented 5 years ago

I got the following error when try to add an App (*.sppkg) to the AppCatalog via PowerShell. I'm trying to add the App to a SharePoint 2019 OnPremise envrionment. For the Authentication we use ADFS. The Connect-PnPOnline command worked as expected. But i can't add the App to the AppCatalog

Expected behavior

App added to AppCatalog

Actual behavior

When executing Add-PnPApp i got an "Object reference not set to an instance of an object" Exception.

image

Steps to reproduce behavior

Connect-PnPOnline -Url $SiteUrl -UseAdfs -Credentials $PSCredentials
$app = Add-PnPApp -Path "<PathToFile>" -Overwrite -Scope Tenant

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.5.1901

How did you install the PnP-PowerShell Cmdlets?

sebastienvieville commented 5 years ago

I reproduced this error with this command line : Add-PnPApp -Path .******.sppkg -Scope Site -Overwrite

I am on SharePoint 2019.

DRamalho92 commented 5 years ago

I've also this issue on SP2019 image

jimmywim commented 5 years ago

I'm having the same error message on SharePoint Online.