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 to retrieve is located
-i, --listId [listId]
- ID of the list to retrieve information for. Specify either id or title but not both
-t, --listTitle [listTitle]
- Title of the list to retrieve information for. Specify either id or title but not both
-c, --clearExistingPermissions
- Flag if used clears all roles from the list
-h, --help
- output usage information
--query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv
. Defaultjson
--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 someList located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList"
Break inheritance of list with ID 202b8199-b9de-43fd-9737-7f213f51c991 located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991"
Break inheritance of list someList located in site https://contoso.sharepoint.com/sites/project-x with clearing permissions
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList" --clearExistingPermissions
Break inheritance of list with ID 202b8199-b9de-43fd-9737-7f213f51c991 located in site https://contoso.sharepoint.com/sites/project-x with clearing permissions
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991" --clearExistingPermissions