Skip to content

New command: m365 spo file sharinglink get #4024

@MathijsVerbeeck

Description

@MathijsVerbeeck

Usage

m365 spo file sharinglink get

Description

Gets details about a specific sharing link

Options

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

Examples

Gets a specific sharing link of a file by id

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

Gets a specific sharing link of a file by url

m365 spo file sharinglink get --webUrl https://contoso.sharepoint.com/sites/demo --id 1 --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

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions