Skip to main content

spo site rename

Renames the URL and title of a site collection


m365 spo site rename [options]


-u, --url <url>

The URL of the site to rename

--newUrl <newUrl>

New URL for the site collection

--newTitle [newTitle]

New title for the site


Suppress marketplace app check


Suppress 2013 workflow check


Wait for the job to complete

-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 for more information and examples.

-o, --output [output]

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


Runs command with verbose logging.


Runs command with debug logging.


Renaming site collections is by default asynchronous and depending on the current state of Microsoft 365, might take up to few minutes. If you're building a script with steps that require the operation to complete fully, you should use the --wait flag. When using this flag, the spo site rename command will keep running until it receives confirmation from Microsoft 365 that the site rename operation has completed.


To use this command you must have permissions to access the tenant admin site.


Starts the rename of the site collection with name "samplesite" to "renamed" without modifying the title

m365 spo site rename --url --newUrl

Starts the rename of the site collection with name "samplesite" to "renamed" modifying the title of the site to "New Title"

m365 spo site rename --url --newUrl --newTitle "New Title"

Renames the specified site collection and waits for the operation to complete

m365 spo site rename --url --newUrl --newTitle "New Title" --wait


"odata.metadata": "$metadata#SP.ApiData.SiteRenameJobEntityDatas/@Element",
"odata.type": "Microsoft.Online.SharePoint.Onboarding.RestService.Service.SiteRenameJob",
"": "",
"odata.editLink": "onboardingservicesbeta/siterenamejobs",
"Option": 0,
"Reserve": null,
"OperationId": "00000000-0000-0000-0000-000000000000",
"SkipGestures": "",
"SourceSiteUrl": "",
"TargetSiteTitle": null,
"TargetSiteUrl": "",
"ErrorCode": 0,
"ErrorDescription": null,
"JobId": "ec3c9add-8b39-4355-b3c7-22f81331f897",
"JobState": "NotStarted",
"ParentId": "00000000-0000-0000-0000-000000000000",
"SiteId": "ffdab06c-3df6-4e60-a46a-fc8a51f32be3",
"TriggeredBy": ""