Skip to main content

spo site recyclebinitem list

Lists items from recycle bin

Usage​

m365 spo site recyclebinitem list [options]

Options​

-u, --siteUrl <siteUrl>

URL of the site for which to retrieve the recycle bin items

--type [type]

Type of items which should be retrieved. Valid values: listItems, folders, files.

--secondary

Use this switch to retrieve items from secondary recycle bin

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, permissions, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks​

When type is not specified then the command will return all items in the recycle bin

Examples​

Lists all files, items and folders from recycle bin for site https://contoso.sharepoint.com/site

m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site

Lists only files from recycle bin for site https://contoso.sharepoint.com/site

m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site --type files

Response​

[
{
"AuthorEmail": "john@contoso.onmicrosoft.com",
"AuthorName": "John",
"DeletedByEmail": "john@contoso.onmicrosoft.com",
"DeletedByName": "John",
"DeletedDate": "2023-04-20T20:02:08Z",
"DeletedDateLocalFormatted": "4/20/2023 1:02 PM",
"DirName": "Lists/Sales",
"DirNamePath": {
"DecodedUrl": "Lists/Sales"
},
"Id": "7709661a-2923-44d1-8200-5e0e4a625ce7",
"ItemState": 1,
"ItemType": 3,
"LeafName": "2_.000",
"LeafNamePath": {
"DecodedUrl": "2_.000"
},
"Size": "196",
"Title": "Test"
}
]