Skip to main content

spo list roleinheritance break

Breaks role inheritance on list or library

Usage

m365 spo list roleinheritance break [options]

Options

-u, --webUrl <webUrl>

URL of the site where the list is located.

-i, --listId [listId]

ID of the list. Specify either listTitle, listId, or listUrl.

-t, --listTitle [listTitle]

Title of the list. Specify either listTitle, listId, or listUrl.

--listUrl [listUrl]

Server- or site-relative URL of the list. Specify either listTitle, listId, or listUrl.

-c, --clearExistingPermissions

Flag if used clears all roles from the list.

-f, --force

Do not prompt for confirmation before breaking role inheritance.

-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 options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

By default, when breaking permissions inheritance, the list will retain existing permissions. To remove existing permissions, use the --clearExistingPermissions option.

Examples

Break inheritance of list by title in a specific site.

m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList"

Break inheritance of list by id in a specific site.

m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991"

Break inheritance of list by title located in a specific site and clearing the existing permissions.

m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList" --clearExistingPermissions

Break inheritance of list by url in a specific site and clearing the existing permissions.

m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listUrl '/sites/project-x/lists/events' --clearExistingPermissions

Break inheritance of list by ID located in in a specific site with clearing permissions without prompting for confirmation.

m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991" --clearExistingPermissions --force

Response

The command won't return a response on success.

CTRL + M