-
Notifications
You must be signed in to change notification settings - Fork 308
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
File/Folder/ListItem sharing commands #3996
Comments
Hi @MathijsVerbeeck @pnp/cli-for-microsoft-365-maintainers what are you thoughts? |
@MathijsVerbeeck great suggestion as always 🤩🤩
|
I think that we should create a seperate command for this, as it is possible to add users and remove existing users at the same time. Using the default 'update' command could be hard to implement this here. I'm not sure on the amount of commands, but I'll list that once you folks say 'Go'! I will have to do some reasearch, as it is also possible to add / remove roles, but we have to think about how we decide if we keep the existing ones or go 'from scratch'.
I think that we should indeed make a separation between SPO and OneDrive, as also this will differ between how to create the sharing link ( A lot of the code for creating the specific request objects will however be able to be re-used, so we will be able to reuse a lot of the code over the two commands. |
Looks good to me 👍 |
I agree |
We might also introduce a command to clear all sharing links of a file, folder, ... That way we can also tackle #3729 |
I did mean to include that in the commands. I'll try my best to write down a list of possible commands tomorrow for the |
For the
What are your opinions about this? |
Looks good, only remark, |
Just one more question: I wonder, for this specific scenario, if it would be useful to use the Beta Graph API, as this is much more extended regarding the use and creation of sharing links. Currently, using the 1.0 API, we cannot for example create user sharing links, but only anonymous or organizational. What is your opinion on this? I'll currently create the specs using the Graph API V1.0, but I can change them obviously later. |
I'd say let's use v1.0 to create anonymous or organizational links and perhaps we can use the beta version to create user sharing links. Would that work? |
@MathijsVerbeeck could you add a reference to all created issues so they are linked to this epic issue? |
Pardon me for coming super late to the discussion. Just that I am a doubtful on the naming though - though we are dealing with sharing links type, but would that name be understandable for the normal user? I doubt so. |
I don't mind the name of the command. This can always change if you guys think that it is clearer if it is
Currently, using the V1.0 api, it indeed is impossible to grant / revoke permissions to an existing sharing link. However, using the beta API, this is possible. This is why I suggested using this earlier. |
I'm not convinced of |
I'm also a fan to follow the Graph docs naming |
great work everybody. I know the issues are already created 😉 but just to confirm the |
Looks great @MathijsVerbeeck! 👏 |
Is there a specific reason these commands have to be in the |
@milanholemans @Jwaegebaert @MathijsVerbeeck lets recheck/refresh this one and reconsider @waldekmastykarz last comment 😉 |
Sorry totally missed this one. I assume it's all sorted out since Waldek opened up the issues and they are already implemented? Anyway for me |
Aren't all files on M365 stored on SPO (especially, if we consider that OneDrive for Business is built on top of SharePoint sites)? We typically use the |
Essentially yes, but in this case we are creating an SPO command and an OneDrive command because in OneDrive we can set additional options for sharing links which only work on OneDrive personal sites. |
So |
That was the idea yes. |
Perfect, so commands listed in this epic are specific to |
Was planning to add them all to this epic, but if you want multiple epics, we can do that as well. |
Ah cool, we can add them here as well. The name of this epic is broad enough to accommodate them both. |
Using the Graph API, we are able to share files, folders or listitems with users using various ways:
In my opinion, it would be nice if we could list the sharing links of a specific file, folder or listitem and have the capability of sharing a file, listitem or folder using a link or update existing shares.
What do you think about this? Does this sound like a good idea? If so, I could make a list of all the possible commands and the properties that could be passed to these commands.
More documentation about sharing files using Graph API can be found on the following link: https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0
Tasks
File
m365 spo file sharinglink list
#4023m365 spo file sharinglink get
#4024m365 spo file sharinglink add
#4025m365 spo file sharinglink set
#4026m365 spo file sharinglink remove
#4027m365 spo file sharinglink clear
#4028Folder
m365 spo folder sharinglink list
#5961m365 spo folder sharinglink get
#5962m365 spo folder sharinglink add
#5963m365 spo folder sharinglink set
#5964m365 spo folder sharinglink clear
#5965m365 spo folder sharinglink remove
#5966The text was updated successfully, but these errors were encountered: