-
Notifications
You must be signed in to change notification settings - Fork 345
Open
Description
Usage
m365 spo tenant site get [options]
Description
Retrieves the tenant site information
Options
Option | Description |
---|---|
-i, --id [id] |
The ID of the site collection. Specify either id , title , or url , but not multiple. |
-t, --title [title] |
Title of the site collection. Specify either id , title , or url , but not multiple. |
-u, --url [url] |
The site URL of the site collection. Specify either id , title , or url , but not multiple. |
Examples
Retrieve info about a site using its ID
m365 spo tenant site get --id 3ae83bc5-1f27-45c1-9eee-1bd1e2ddce69
Retrieve info about a site using its URL
m365 spo tenant site get --url "https://contoso.sharepoint.com/sites/Marketing"
Retrieve info about a site using its Title
m365 spo tenant site get --title Marketing
Default properties
No response
Additional Info
Remarks
Note
(Use info admonition instead)
To use this command you must be either SharePoint Administrator or Global Administrator.
Requests:
When using id
:
GET https://contoso-admin.sharepoint.com/_api/SPO.Tenant/sites('53dec431-9d4f-415b-b12b-010259d5b4e1')
When using url
:
Use spo.getSiteAdminPropertiesByUrl()
util function.
When using title
:
To achieve this, we should probably query the tenant sites list to get the right information. If there are multiple sites with the same name, we should prompt the user to make a choice like we do in other commands.
Jwaegebaert