Skip to content

New command: 🔐 spo folder roleinheritance break #3598

@Adam-it

Description

@Adam-it

Usage

m365 spo folder roleinheritance break [options]

Description

break inheritance of folder. Keeping existing permissions is the default behavior.

Options

Option Description
-u, --webUrl <webUrl> URL of the site where the item for which to break role inheritance is located
-f, --folderUrl <folderUrl> The site-relative URL of the folder
-c, --clearExistingPermissions Set to clear existing roles from the list item
--confirm Don't prompt for confirmation

Examples

Break inheritance of folder with site-relative url /Shared Documents located in site https://contoso.sharepoint.com/sites/project-x

m365 spo folder roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --folderUrl "/Shared Documents"

Break inheritance of folder with site-relative url /Shared Documents located in site https://contoso.sharepoint.com/sites/project-x with clearing permissions

m365 spo folder roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --folderUrl "/Shared Documents" --clearExistingPermissions

Additional Info

we may also reuse command we already have using Cli.executeCommandWithOutput. We may reuse the m365 spo folder get command and the m365 spo listitem roleinheritance break.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions