Open Koning53 opened 5 years ago
The New-PnPSite respectively the underlying Api only supports LegacyAuthentication. So you cannot use -UseWeblogin or modern app authentication. In that case you receive the same error message so I am quite sure it's valid for your auth method, too, which I never used to be hinest.
Reporting an Issue or Missing Feature
Issue
Expected behavior
New-PnPSite should create a new (Communication) Site
Actual behavior
New-PnPSite : The remote server returned an error: (401) Unauthorized
Steps to reproduce behavior
Connect-PnPOnline -url https://tenant-admin.sharepoint.com -LaunchBrowser:$false -PnPO365ManagementShell:$true New-PnPSite -Url https://tenant.sharepoint.com/sites/test -Type CommunicationSite -Title Test -Description Test -SiteDesign Blank
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
3.4.1812.2 (3.4.1812.0 introduced the issue)
How did you install the PnP-PowerShell Cmdlets?
The same command works in 3.3.1811.0.