Invoke-PnPSiteTemplate System.UnauthorizedAccessException Error applying default column values
See original GitHub issueScenario:
A PnP template that has been working for a long time and has been successfully applied to more than 50 sites, working yesterday at 5pm, suddenly (but consistently) since then now failing when running Invoke-PnPSiteTemplate
. The output to the PowerShell console says Error applying default column values
but the trace log says System.UnauthorizedAccessException
(see below)
The same template applies ok in a different non-production tenant. Any ideas how I debug this?
Error from Set-PnPTraceLog:
pwsh Information: 0 : 2023-02-24 09:28:21.2563 [List instances] [20] [Debug] Creating view Workspace 33258ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Information: 0 : 2023-02-24 09:28:21.7511 [List instances] [20] [Debug] Creating view All Items 33753ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Information: 0 : 2023-02-24 09:28:22.2736 [List instances] [20] [Debug] Creating view All Items 34275ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Information: 0 : 2023-02-24 09:28:22.7679 [List instances] [20] [Debug] Creating view All Items 34770ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Error: 0 : 2023-02-24 09:28:24.1627 [PnP.Framework] [0] [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: Attempted to perform an unauthorized operation. at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServerAsync(ChunkStringBuilder sb) at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryAsync() at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync() at Microsoft.SharePoint.Client.ClientContext.ExecuteQueryAsync() at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, String userAgent) ServerErrorCode: -2147024891 ServerErrorTypeName: System.UnauthorizedAccessException ServerErrorTraceCorrelationId: d64e99a0-60b2-6000-3b7f-0053ec780ba4 ServerErrorValue: ServerErrorDetails: . 0ms pwsh Information: 0 : 2023-02-24 09:28:24.1632 [List instances] [20] [Debug] Code execution scope ended 36165ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Information: 0 : 2023-02-24 09:28:24.1633 [ProvisioningTemplate WebHook Call] [20] [Debug] Code execution scope started 0ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Information: 0 : 2023-02-24 09:28:24.1633 [ProvisioningTemplate WebHook Call] [20] [Debug] Code execution scope ended 0ms 79ac16c2-5903-4744-9cb1-7e66d20e6953 pwsh Information: 0 : 2023-02-24 09:28:24.1634 [Provisioning] [20] [Debug] Code execution scope ended 102344ms 79ac16c2-5903-4744-9cb1-7e66d20e6953
Issue Analytics
- State:
- Created 7 months ago
- Reactions:4
- Comments:7
Top GitHub Comments
@popoygaming
yes, just checked and the Jackpoz repro https://github.com/pnp/powershell/issues/2814#issuecomment-1433424132 now works
despite an open support ticket since last Friday, radio silence.UPDATE: we have been told that a SharePoint Product Group update has been recognised as causing this issue, and retracted. I have no link to a public statement however.So am I. I expect we all are. But at least this time the PnP community has rocked…
@popoygaming Just now checked, even in my tenant its now working.
@anthonywhite @markgort86