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 set #5964

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

New command: m365 spo folder sharinglink set #5964

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

Comments

@MathijsVerbeeck
Copy link
Contributor

MathijsVerbeeck commented Apr 5, 2024

Usage

m365 spo folder sharinglink set [options]

Description

Updates a specific sharing link to 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
--role [role] Role to set. Possible options are: read or write.
--expirationDateTime [expirationDateTime] The date and time to set the expiration. This should be defined as a valid ISO 8601 string.

Examples

Updates the expiration datetime of an anonymous sharing link with a specific id.

m365 spo folder sharinglink set --webUrl https://contoso.sharepoint.com/sites/demo --folderId daebb04b-a773-4baa-b1d1-3625418e3234 --id 1 --expirationDateTime '2022-11-30T00:00:00Z'

Updates the roles of a sharing link.

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

Default properties

No response

Additional Info

The API call to set a sharing link can be found on the following documentation: https://learn.microsoft.com/en-us/graph/api/permission-update?view=graph-rest-v1.0&tabs=http

Currently, using the Graph 1.0 API, it is not possible to modify sharing links of type 'Organizational'.

@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

Currently, using the Graph 1.0 API, it is not possible to modify sharing links of type 'Organizational'.

we should definitely add this to a remark section in the command docs.

Other than that LGTM 👍. Awesome work 👏
@pnp/cli-for-microsoft-365-maintainers last change to have a 👀 on this before we open it up 👍

@Jwaegebaert
Copy link
Contributor

Looks good! @MathijsVerbeeck, do you want to work on this one?

@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?

@milanholemans
Copy link
Contributor

Sure, thanks @Saurabh7019

Saurabh7019 added a commit to Saurabh7019/cli-microsoft365 that referenced this issue May 3, 2024
Saurabh7019 added a commit to Saurabh7019/cli-microsoft365 that referenced this issue May 3, 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