pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
679 stars 348 forks source link

Add-PnPSiteCollectionAppCatalog does not work #1028

Closed dbahnms closed 3 years ago

dbahnms commented 3 years ago

Its more an information PnP.Powershell

Expected behavior

Add-PnPSiteCollectionAppCatalog creates an whitelist entry to enable the site collections app catalog

Actual behavior

image Tested with SharePointPnP.Modules, too. Here it works.

Steps to reproduce behavior

$con = Connect-PnPOnline -Url $url_admin -Interactive #-UseWebLogin Add-PnPSiteCollectionAppCatalog -Site $url -Connection $con

Connection info: image Module info: image

Which operating system/environment are you running PnP PowerShell on?

veronicageek commented 3 years ago

@dbahnms - What is it you're reporting exactly? Information or issue? If an issue, can you please translate the error message in english please? Thanks.

dbahnms commented 3 years ago

Hi, it´s an issue. But currently exist so much PnP.Powershell problems mostly with the same error (401), this indicates a fault in a basic component.

Add-PnPSiteCollectionAppCatalog generates an error (short form) "Permissions required (site collection admin or tenant admin) to change app catalogue entries"

gautamdsheth commented 3 years ago

@dbahnms - yeah you need to be a SharePoint admin to execute this cmdlet, 401 most likely indicates that you dont have sufficient permissions to execute them.

Please try them with a tenant admin account.

dbahnms commented 3 years ago

@dbahnms - yeah you need to be a SharePoint admin to execute this cmdlet, 401 most likely indicates that you dont have sufficient permissions to execute them.

Please try them with a tenant admin account.

image

gautamdsheth commented 3 years ago

Sorry unable to reproduce this issue:

image

Any chance you can try this on another site collection or another tenant maybe ?

KoenZomers commented 3 years ago

Works fine here too:

image

@dbahnms mind sharing a Fiddler trace privately (do not post it here!) while you execute these cmdlets so we can try to see why it fails for you?

dbahnms commented 3 years ago

Yes, now it works. I changed nothing. Even #963 works without changing the library (1.7.0). Strange.... Issue can be closed.