Skip to content

spo file roleinheritance reset

Restores the role inheritance of a file

Usage

m365 spo file roleinheritance reset [options]

Options

-u, --webUrl <webUrl>
URL of the site where the file is located
--fileUrl [fileUrl]
The server-relative URL of the file to retrieve. Specify either fileUrl or fileId but not both
i, --fileId [fileId]
The UniqueId (GUID) of the file to retrieve. Specify either fileUrl or fileId but not both
--confirm
Don't prompt for confirmation
-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

Reset inheritance of file with id (UniqueId) b2307a39-e878-458b-bc90-03bc578531d6 located in site https://contoso.sharepoint.com/sites/project-x

m365 spo file roleinheritance reset --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileId "b2307a39-e878-458b-bc90-03bc578531d6"

Reset inheritance of file with server-relative url /sites/project-x/documents/Test1.docx located in site https://contoso.sharepoint.com/sites/project-x. It will not prompt for confirmation before resetting.

m365 spo file roleinheritance reset --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "/sites/project-x/documents/Test1.docx" --confirm