Skip to content

New command: spo file sharinginfo get #1659

@appieschot

Description

@appieschot

Usage

spo file sharinginfo get [options]

Description

Generates the sharing information report for specified file

Options

Option Description
-w, --webUrl<webUrl> The URL of the site where the file is located
-i, --id[id] The UniqueId (GUID) of the file for the sharing report. Specify either url or id but not both
-u, --url[url] The server-relative URL of the file for the sharing report. Specify either url or id but not both
-o, --output [output] Output type. json,text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Additional Information

Can be done using REST using _api/SP.Web.GetObjectSharingSettings?$expand=ObjectSharingInformation,ObjectSharingInformation/SharedWithUsersCollection,SharePointSettings,SharePointSettings/PickerProperties,SharingPermissions

Based on research by @arjunumenon it turns out the REST option is not providing all options (most likely due to beta nature of the call). Should resort to CSOM option, More info on the object on: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/mt143096(v%3Doffice.15). Once in place we could scale this command out for more options like using it on both site, web and library levels :).

As the command expects the ID, if the url is specified please use a REST call to retrieve the ID and process further.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions