pnp / pnp/cli-microsoft365

New command: m365 spo archivefile list

Open
#7,438 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request needs design
Dominant language
TypeScript
Stars
1.5k
Forks
413
Avg merge
5d 6h
Merged PRs (30d)
21

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the new m365 spo archivefile list command entry point and review the three Microsoft Graph enumeration endpoints listed in the issue, including their library selector inputs. Done means the command lists archived files by library ID, title, or URL and exposes the stated default properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.