pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
882 stars 312 forks source link

New command: `m365 spo folder sharinglink get` #5962

Open MathijsVerbeeck opened 3 months ago

MathijsVerbeeck commented 3 months ago

Usage

m365 spo folder sharinglink get [options]

Description

Gets details about a specific sharing link on a folder

Options

Option Description
-u, --webUrl <webUrl> The URL of the site where the file is located
--folderUrl [folderUrl] The server- or site-relative decoded URL of the folder. Specify either folderUrl or folderId but not both
--folderId [folderId] The unique ID (GUID) of the folder. Specify either folderUrl or folderId but not both
-i, --id <id> The sharing link ID

Examples

Gets a specific sharing link of a folder by id

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

Gets a specific sharing link of a folder by url

m365 spo folder sharinglink get --webUrl https://contoso.sharepoint.com/sites/demo --id 1 --folderUrl /sites/demo/shared%20documents/Folder

Default properties

No response

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

nanddeepn commented 2 months ago

Can I work on it?

milanholemans commented 2 months ago

Sure, thanks!