spo get
Gets the context URL for the root SharePoint site collection and SharePoint tenant admin site
Usage
m365 spo get [options]
Options
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
CLI for Microsoft 365 automatically discovers the URL of the root SharePoint site collection/SharePoint tenant admin site (whichever is needed to run the particular command). Using this command you can see which URLs the CLI has discovered.
Examples
Get the context URL for the root SharePoint site collection and SharePoint tenant admin site
m365 spo get --output json
Response
- JSON
- Text
- CSV
- Markdown
{
"SpoUrl": "https://contoso.sharepoint.com"
}
SpoUrl: https://contoso.sharepoint.com
SpoUrl
https://contoso.sharepoint.com
# spo get
Date: 4/10/2023
Property | Value
---------|-------
SpoUrl | https://contoso.sharepoint.com