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.
--folderUrl <folderUrl>The server- or site-relative decoded URL of the folder.
-c, --clearExistingPermissionsClear all existing permissions from the folder.
-f, --forceDon'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,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns 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 --force
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 --force
Response
The command won't return a response on success.