pnp / cli-microsoft365

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

New command: `m365 spo folder sharinglink list` #5961

Closed MathijsVerbeeck closed 1 month ago

MathijsVerbeeck commented 6 months ago

Usage

m365 spo folder sharinglink list [options]

Description

Lists all the sharing links of a specific 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
--scope [scope] Filter the results to only sharing links of a given scope: anonymous, users or organization. By default all sharing links are listed

Examples

List sharing links of a folder by id

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

List sharing links of a folder by url

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

Default properties

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

Adam-it commented 5 months ago

Please check other commands that have some small naming corrections + additional site-relative URL for folderUrl. besides that LGTM.

@pnp/cli-for-microsoft-365-maintainers, anyone else?

Saurabh7019 commented 5 months ago

Can I work on this issue?

Jwaegebaert commented 5 months ago

All yours @Saurabh7019!