Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: spo tenant archivesite list #6547

Open
Tracked by #5982
milanholemans opened this issue Jan 4, 2025 · 2 comments
Open
Tracked by #5982

New command: spo tenant archivesite list #6547

milanholemans opened this issue Jan 4, 2025 · 2 comments
Labels
good first issue needs peer review Needs second pair of eyes to review the spec or PR new feature

Comments

@milanholemans
Copy link
Contributor

Usage

m365 spo tenant archivesite list [options]

Description

Lists all currently archived sites in the tenant

Options

None!

Examples

Lists all archived sites in the tenant

m365 spo tenant archivesite list

Default properties

  • Title
  • SiteId
  • SiteUrl

Additional Info

API

POST https://contoso-admin.sharepoint.com/_api/SPO.Tenant/GetSitesByState
{
    "states": [6, 15]
}

Sample response

{
	"FileSystemObjectType": 0,
	"Id": 162,
	"ServerRedirectedEmbedUri": null,
	"ServerRedirectedEmbedUrl": "",
	"ContentTypeId": "0x010087FCBB007AEB3E40A92648B0CC7779F4",
	"Title": "ValoPages2",
	"ComplianceAssetId": null,
	"AllowGuestUserSignIn": true,
	"CreatedBy": "John Doe",
	"DeletedBy": null,
	"ExternalSharing": "On",
	"FileViewedOrEdited": 0,
	"GroupId": "005519b4-8883-4b82-be86-2a0f55f09e1f",
	"HubSiteId": "00000000-0000-0000-0000-000000000000",
	"Initiator": "[email protected]",
	"LastActivityOn": "2024-11-07T01:00:00",
	"NumOfFiles": 9,
	"OperationStartTime": "2025-01-04T15:24:54",
	"PageViews": 0,
	"PagesVisited": 0,
	"SensitivityLabel": null,
	"SiteId": "3ea08106-f24b-4f6c-8c5e-9074e84f2411",
	"SiteOwnerEmail": null,
	"SiteOwnerName": null,
	"State": 15,
	"StorageQuota": 27487790694400.0,
	"StorageUsed": 2321028.0,
	"StorageUsedPercentage": "8.44385067466646E-8",
	"TemplateName": "GROUP#0",
	"TimeCreated": "2024-09-12T05:49:24",
	"TimeDeleted": null,
	"SiteUrl": "https://contoso.sharepoint.com/sites/Marketing",
	"SiteCreationSource": "39966a89-5583-4e7f-a348-af1bf160ae49",
	"SiteFlags": 2,
	"RelatedGroupId": "005519b4-8883-4b82-be86-2a0f55f09e1f",
	"ChannelType": 0,
	"ChannelSitesCount": null,
	"CreatedByEmail": "[email protected]",
	"IBSegmentsGuids": null,
	"ConditionalAccessPolicy": 0,
	"WasSegmentApplied": false,
	"ArchiveStatus": "Archiving",
	"OData__ColorTag": null,
	"IBMode": "Open",
	"BlockDownloadPolicy": false,
	"ID": 162,
	"Modified": "2025-01-04T15:24:55",
	"Created": "2024-09-12T14:49:30",
	"AuthorId": 1073741823,
	"EditorId": 1073741823,
	"OData__UIVersionString": "1.0",
	"Attachments": false,
	"GUID": "ef3704c3-4c6f-4ec5-824b-79a313848eca"
}

Docs

Note

(Lets use info admonition)
To use this command, you must be a Global or SharePoint administrator.

@milanholemans milanholemans added new feature needs research needs peer review Needs second pair of eyes to review the spec or PR good first issue and removed needs research labels Jan 4, 2025
@milanholemans
Copy link
Contributor Author

@pnp/cli-for-microsoft-365-maintainers, I'm not really sure about the name of the command. Currently, we already have:

  • spo tenant site archive
  • spo tenant site unarchive

@Adam-it
Copy link
Member

Adam-it commented Jan 5, 2025

@pnp/cli-for-microsoft-365-maintainers, I'm not really sure about the name of the command. Currently, we already have:

TBH I don't have any different suggestions. For me the name is fine and explains exactly what is going to be done.
I want to list archive sites on my tenant -> tenant archivesite list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue needs peer review Needs second pair of eyes to review the spec or PR new feature
Projects
None yet
Development

No branches or pull requests

2 participants