Usage
m365 spo listitem roleinheritance break
Description
break inheritance of list item, file or folder. Keeping existing permissions is the default behavior.
Options
| Option |
Description |
-u, --webUrl <webUrl> |
URL of the site from which the item should be retrieved |
-i, --id <id> |
ID of the item to retrieve |
-l, --listId [listId] |
ID of the list. Specify listId or listTitle but not both |
-t, --listTitle [listTitle] |
Title of the list. Specify listId or listTitle but not both |
-c --clearExistingPermissions |
Flag if used clears all roles from the list |
Additional Info
breaking role inheritance is the first step before we start adding some commands which will allow to manage permissions on items (add/remove roles etc.) which is what I would like to aim as described here #3184.
I did some research and for this command we may use the POST request
_api/web/lists/getbytitle('${ListTileHere}')/items(${itemId})/breakroleinheritance(${TrueOrFalseHere})
also when user will define list Id not Title we may just use the getbyid() instead of getbytitle
Usage
m365 spo listitem roleinheritance break
Description
break inheritance of list item, file or folder. Keeping existing permissions is the default behavior.
Options
-u, --webUrl <webUrl>-i, --id <id>-l, --listId [listId]-t, --listTitle [listTitle]-c --clearExistingPermissionsAdditional Info
breaking role inheritance is the first step before we start adding some commands which will allow to manage permissions on items (add/remove roles etc.) which is what I would like to aim as described here #3184.
I did some research and for this command we may use the POST request
also when user will define list Id not Title we may just use the
getbyid()instead ofgetbytitle