Skip to main content

spo set

Sets the URL of the root SharePoint site collection for use in SPO commands

Usage

m365 spo set [options]

Options

-u, --url <url>

The URL of the root SharePoint site collection to use in SPO commands

-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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--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). In specific cases, like when managing multi-geo Microsoft 365 tenants, it could be desirable to make the CLI manage the specific geography. For such cases, you can use this command to explicitly specify the SPO URL that should be used when executing SPO commands.

Examples

Set SPO URL to the specified URL

m365 spo set --url https://contoso.sharepoint.com

Response

The command won't return a response on success.

CTRL + M