Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: m365 spo folder sharinglink clear #5965

Open
Tracked by #3996
MathijsVerbeeck opened this issue Apr 5, 2024 · 4 comments · May be fixed by #6054
Open
Tracked by #3996

New command: m365 spo folder sharinglink clear #5965

MathijsVerbeeck opened this issue Apr 5, 2024 · 4 comments · May be fixed by #6054

Comments

@MathijsVerbeeck
Copy link
Contributor

MathijsVerbeeck commented Apr 5, 2024

Usage

m365 spo folder sharinglink clear [options]

Description

Removes all sharing links of 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
-s, --scope [scope] Scope of the sharing link. Possible options are: anonymous, users or organization. If not specified, all links will be removed.
-f, --force Don't prompt for confirmation

Examples

Removes a specific sharing link from a folder by id without prompting for confirmation

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

Removes a specific sharing link from a folder by url with prompting for confirmation

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

Default properties

No response

Additional Info

No response

@milanholemans milanholemans added new feature needs peer review Needs second pair of eyes to review the spec or PR labels Apr 5, 2024
@Adam-it
Copy link
Contributor

Adam-it commented Apr 10, 2024

  • in the examples you refer to the remove command instead of clear
  • if I understand it properly if clear means removing all sharinglinks then why would we need the id option and why even make it required? Seems to me this option will allow to clear single sharinglink which is the same as the remove command right.
  • maybe the scope should also have an option all which will be just default. What is your take on that?
  • also what @milanholemans pointed out in other issue - folderUrl should allow server and site-relative URLs

@pnp/cli-for-microsoft-365-maintainers anyone else up for 👀 on this 👍

@MathijsVerbeeck
Copy link
Contributor Author

  • in the examples you refer to the remove command instead of clear

My bad

  • if I understand it properly if clear means removing all sharinglinks then why would we need the id option and why even make it required? Seems to me this option will allow to clear single sharinglink which is the same as the remove command right.

Again, too hasty

  • maybe the scope should also have an option all which will be just default. What is your take on that?

Why would we do that? We have it in quite a lot of commands that we simply use all when nothing is specified

  • also what @milanholemans pointed out in other issue - folderUrl should allow server and site-relative URLs

Changed that

@Jwaegebaert Jwaegebaert added help wanted feature request and removed new feature needs peer review Needs second pair of eyes to review the spec or PR labels Apr 16, 2024
@Saurabh7019
Copy link
Contributor

Can I work on it?

@Adam-it
Copy link
Contributor

Adam-it commented May 15, 2024

@Saurabh7019 the stage is yours 👍
You Rock 🤩

Saurabh7019 added a commit to Saurabh7019/cli-microsoft365 that referenced this issue May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants