Skip to content

New command: m365 spo file sharinglink list #4023

@MathijsVerbeeck

Description

@MathijsVerbeeck

Usage

m365 spo file sharinglink list

Description

Lists all the sharing links of a specific file

Options

Option Description
-u, --webUrl <webUrl> The URL of the site where the file is located
-f, --fileUrl [fileUrl] The server-relative URL of the file. Specify either fileUrl or fileId but not both
-i, --fileId [fileId] The UniqueId (GUID) of the file. Specify either fileUrl or fileId but not both

Examples

List sharing links of a file by id

m365 spo file sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --fileId daebb04b-a773-4baa-b1d1-3625418e3234

List sharing links of a file by url

m365 spo file sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --fileUrl /sites/demo/shared%20documents/document.docx

Additional Info

To get the specified data, we will have to use the Graph API. More documentation can be found below: https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions