Skip to content

New command: m365 spo archivefile list #7438

Description

@Saurabh7019

Usage

m365 spo archivefile list [options]

Description

Lists archived files in a document library

Options

Option Description
-u, --webUrl <webUrl> The URL of the site where the document library is located.
-i, --id [id] ID of the document library to list archived files from. Specify either id, title, or url, but not multiple.
-t, --title [title] Title of the document library to list archived files from. Specify either id, title, or url, but not multiple.
--url [url] Server- or site-relative URL of the document library. Specify either id, title, or url, but not multiple.

Examples

List archived files in a document library by title

m365 spo archivefile list --webUrl https://contoso.sharepoint.com/sites/Marketing --title Documents

List archived files in a document library by ID

m365 spo archivefile list --webUrl https://contoso.sharepoint.com/sites/Marketing --id 7a8c9207-7745-4cda-b0e2-be2618ee3030

List archived files in a document library by URL

m365 spo archivefile list --webUrl https://contoso.sharepoint.com/sites/Marketing --url '/sites/Marketing/Documents'

Default properties

  • name
  • archiveStatus
  • size
  • webUrl
  • createdDateTime
  • lastModifiedDateTime

Additional Info

Per Microsoft 365 Archive developer guidance, the following enumeration APIs are recommended:

GET https://graph.microsoft.com/v1.0/drives/{drive-id}/root/children
GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/driveItem
GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?$expand=fields($select=_FileArchiveStatus)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions