Skip to content

[BUG] Set-PnPList -BreakRoleInheritance returns "The list is not DocumentLibrary, VersionPolicies is not supported." #3614

@cprovpo

Description

@cprovpo

Reporting an Issue or Missing Feature

When running Set-PnPList -BreakRoleInheritance -ResetRoleInheritance, the command fails and returns this exception message "The list is not DocumentLibrary, VersionPolicies is not supported." A user with a very similar issue reported this today on Stack Overflow here

Expected behavior

The command should result in the list having its inheritance permissions broken from the parent site AND having all existing permissions removed.

Actual behavior

When running the script either from VS Code or pwsh.exe, the exception is thrown. However, if I stop the debugger and run the script manually (by running the selection), it runs successfully.
image

Steps to reproduce behavior

$list = "Test List"
Set-PnPList -Identity $list -BreakRoleInheritance -ResetRoleInheritance

Code fails during script runs, but will complete if run as an individual selection.

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

PnP.PowerShell 2.2.130 nightly build

Which operating system/environment are you running PnP PowerShell on?

  • [x ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions