Skip to content

New command: m365 spo file sharinglink remove #4027

Description

@MathijsVerbeeck

Usage

m365 spo file sharinglink remove

Description

Removes a specific sharing link to a file

Options

Option Description
-u, --webUrl <webUrl> The URL of the site where the file is located
--fileUrl [fileUrl] The server-relative URL of the file. Specify either fileUrl or fileId but not both
--fileId [fileId] The UniqueId (GUID) of the file. Specify either fileUrl or fileId but not both
-i, --id <id> The ID of the sharing link
--confirm Don't prompt for confirmation

Examples

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

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

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

m365 spo file sharinglink remove --webUrl https://contoso.sharepoint.com/sites/demo --fileUrl /sites/demo/shared%20documents/document.docx --id 1

Additional Info

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions