pnp / PnP-PowerShell

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

Apply-PnPTenantTemplate / New-PnPSite does not support App Only authentication for type "TeamSite" #2398

Open zapftho opened 4 years ago

zapftho commented 4 years ago

Reporting an Issue or Missing Feature

As reported in issue #2368 I was having issues using Apply-PnPTenantTemplate with App Only authentication. This issue is still not fully solved. It is working now with the newest version if you want to create a "CommunicationSite" but is not working for "TeamSite" type for both: Apply-PnPTenantTemplate and New-PnPSite.

Expected behavior

I would expect that app only authentication is working for both, creating a communication site and a teamsite with PnP Powershell

Actual behavior

image

Output of Get-PnPException:

image

Steps to reproduce behavior

$AppId = "<AppId>"
$Thumbprint = "<Thumbprint>"
$Tenant = "<Tenant>.onmicrosoft.com"

Connect-PnPOnline -Url https://<tenant>-admin.sharepoint.com -ClientId $AppId -Thumbprint $Thumbprint -Tenant $Tenant
New-PnPSite -Type TeamSite -Title "My Cert Test" -Alias "cert-test"

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

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

3.16.1912.0

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

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

gobigfoot commented 4 years ago

This issue is a duplicate of https://github.com/SharePoint/PnP-PowerShell/issues/1830. I too desperately want this functionality, but it doesn't appear to be a top priority.