pnp / pnp/pnpframework

Template previously worked, now encounters error "You are not allowed to rename this library."

Open
#803 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Using PnP.PowerShell to apply a site template, the .pnp template is based on a SharePoint Team site with the following additions:

  • A series of custom site columns
  • 2x Custom content types
  • Custom list
  • Custom document library

The Custom document library has a custom content type added, and the default "Document" content type is removed

When executing Invoke-PnPSiteTemplate with this template, prior to last week, the template would successfully provision to the target site / tenant without crashing out.

As of now, the same .pnp template crashes out immediately after the following debug message is output:

pwsh Information: 0 : 2022-12-02 13:30:58.1147  [List instances]        [10]    [Debug] Added property bag entry IsAttachmentLibrary to list Committee Documents        37731ms 4f001375-60b0-46f1-a95b-ce7beb954e8a

The same error above can be reproduced with the same .pnp template in two tenants.

The same .pnp template continues to work in a different tenant (a developer tenant on first release)

Exception:

pwsh Error: 0 : 2022-12-02 13:30:58.3094        [PnP.Framework] [0]     [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerException: You are not allowed to rename this library.
   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: -2130575223
ServerErrorTypeName: Microsoft.SharePoint.SPException
ServerErrorTraceCorrelationId: 902d7ea0-30b4-1000-e802-e84cb01ade7d
ServerErrorValue:
ServerErrorDetails:
.       0ms
pwsh Information: 0 : 2022-12-02 13:30:58.3119  [List instances]        [10]    [Debug] Code execution scope ended      37928ms 4f001375-60b0-46f1-a95b-ce7beb954e8a
pwsh Information: 0 : 2022-12-02 13:30:58.3128  [ProvisioningTemplate WebHook Call]     [10]    [Debug] Code execution scope started    0ms     4f001375-60b0-46f1-a95b-ce7beb954e8a
pwsh Information: 0 : 2022-12-02 13:30:58.3134  [ProvisioningTemplate WebHook Call]     [10]    [Debug] Code execution scope ended      0ms     4f001375-60b0-46f1-a95b-ce7beb954e8a
pwsh Information: 0 : 2022-12-02 13:30:58.3141  [Provisioning]  [10]    [Debug] Code execution scope ended      106491ms        4f001375-60b0-46f1-a95b-ce7beb954e8a

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure through Invoke-PnPSiteTemplate with the described .pnp template, recording the list-instances step and comparing the two failing tenants with the developer tenant. Trace the provisioning path responsible for the custom document library and determine why it attempts a prohibited rename; done means the template provisions successfully across the affected tenants without that exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
backend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.