spo folder sharinglink list
Lists all the sharing links of a specific folder
Usage
m365 spo folder sharinglink list [options]
Options
-u, --webUrl <webUrl>
The URL of the site where the folder is located.
--folderUrl [folderUrl]
The server- or site-relative decoded URL of the folder. Specify either
folderUrl
orfolderId
but not both.--folderId [folderId]
The UniqueId (GUID) of the folder. Specify either
folderUrl
orfolderId
but not both.-s, --scope [scope]
Filter the results to only sharing links of a given scope:
anonymous
,users
ororganization
. By default all sharing links are listed.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
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 documents/folder"
List anonymous sharing links of a folder by url.
m365 spo folder sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --folderUrl "/sites/demo/shared documents/folder" --scope anonymous
Response
- JSON
- Text
- CSV
- Markdown
[
{
"id": "e6100f73-981c-4bde-986b-eed262f04659",
"roles": [
"write"
],
"shareId": "u!aHR0cHM6Ly83NTY2YXZhLnNoYXJlcG9pbnQuY29tLzpmOi9nL0V2QVFpdnpLV2ZoT3ZJOHJiNm1UVEhjQmQzUUxCOXVsUGIyQTQ1UG81ZmRuYWc",
"hasPassword": false,
"grantedToIdentitiesV2": [],
"grantedToIdentities": [],
"link": {
"scope": "anonymous",
"type": "edit",
"webUrl": "https://contoso.sharepoint.com/:f:/g/EvAQivzKWfhOvI8rb6mTTHcBd3QLB9ulPb2A45Po5fdnag",
"preventsDownload": false
}
}
]
id scope roles link
------------------------------------ ------------ ----- -----------------------------------------------------------------------------------
e6100f73-981c-4bde-986b-eed262f04659 anonymous write https://contoso.sharepoint.com/:f:/g/EvAQivzKWfhOvI8rb6mTTHcBd3QLB9ulPb2A45Po5fdnag
id,shareId,hasPassword
e6100f73-981c-4bde-986b-eed262f04659,u!aHR0cHM6Ly83NTY2YXZhLnNoYXJlcG9pbnQuY29tLzpmOi9nL0V2QVFpdnpLV2ZoT3ZJOHJiNm1UVEhjQmQzUUxCOXVsUGIyQTQ1UG81ZmRuYWc,
# spo folder sharinglink list --webUrl "https://contoso.sharepoint.com/" --folderUrl "/shared documents/folder1"
Date: 24/04/2024
## e6100f73-981c-4bde-986b-eed262f04659
Property | Value
---------|-------
id | e6100f73-981c-4bde-986b-eed262f04659
shareId | u!aHR0cHM6Ly83NTY2YXZhLnNoYXJlcG9pbnQuY29tLzpmOi9nL0V2QVFpdnpLV2ZoT3ZJOHJiNm1UVEhjQmQzUUxCOXVsUGIyQTQ1UG81ZmRuYWc
hasPassword | false