Skip to content

spo folder roleinheritance break

Breaks the role inheritance of a folder.

Usage

m365 spo folder roleinheritance break [options]

Options

-u, --webUrl <webUrl>
URL of the site where the folder is located.
-f, --folderUrl <folderUrl>
The site-relative URL or server-relative URL of the folder.
-c, --clearExistingPermissions
Clear all existing permissions from the folder.
--confirm
Don't prompt for confirmation to breaking role inheritance of the folder.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is full.
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Examples

Break the inheritance of a folder with a specified site-relative URL.

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

Break the inheritance of a folder with a specified server-relative URL. It will clear the existing permissions of the folder. It will not prompt for confirmation before breaking the inheritance.

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

Break the inheritance of the specified root folder for the library with a specified server-relative URL. It will clear the existing permissions of the root folder. It will not prompt for confirmation before breaking the inheritance.

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