pnp / PnP-PowerShell

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

Unable to run PnP commands on SharePoint server 2019 #2291

Open DiptiC-InsightRun opened 5 years ago

DiptiC-InsightRun commented 5 years ago

Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:

  1. Are you using Apply-SPOProvisioningTemplate or Get-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues

Reporting an Issue or Missing Feature

I am unable to run Pnp Commands in SharePoint server 2019.After installing a module for SharePoint Server 2019 > Connect Pnp Online throws following error: Connect-PnPOnline : The remote server returned an error: (403) Forbidden.

Expected behavior

I should be able to run all supported PnP Commands in SharePoint Server 2019

Actual behavior

image

Steps to reproduce the behavior

run SharePoint 2019 Management Shell as Administrator Installed Pnp module for SharePoint Server 2019 with this command : image Then ran following command: image

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

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

ModuleType Version Name


Binary 3.13.19... SharePointPnPPowerShell2019

How did you install the PnP-PowerShell Cmdlets?

ghost commented 5 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

DiptiC-InsightRun commented 4 years ago

Hello,

I got it resolved this issue by running following command:

Connect-PnpOnline –Url "http://siteURL" -UseWebLogin

In my environment, the authentication process is different, therefore adding -UseWebLogin did the work :)

Thank you and Best Regards,