Skip to content

spo site set

Updates properties of the specified site


m365 spo site set [options]


-u, --url <url>
The URL of the site collection to update
--classification [classification]
The new classification for the site collection
--disableFlows [disableFlows]
Set to true to disable using Microsoft Flow in this site collection
--isPublic [isPublic]
Set to true to make the group linked to the site public or to false to make it private
--owners [owners]
Comma-separated list of users to add as site collection administrators
--shareByEmailEnabled [shareByEmailEnabled]
Set to true to allow to share files with guests and to false to disallow it
--siteDesignId [siteDesignId]
Id of the custom site design to apply to the site
--title [title]
The new title for the site collection
--description [description]
The site description
--sharingCapability [sharingCapability]
The sharing capability for the site. Allowed values: Disabled, ExternalUserSharingOnly, ExternalUserAndGuestSharing, ExistingExternalUserSharingOnly.
--siteLogoUrl [siteLogoUrl]
Set the logo for the site collection. This can be an absolute or relative URL to a file on the current site collection.
-h, --help
output usage information
--query [query]
JMESPath query string. See for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
Runs command with verbose logging
Runs command with debug logging


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


If the specified url doesn't refer to an existing site collection, you will get a 404 - "404 FILE NOT FOUND" error.

The isPublic property can be set only on groupified site collections. If you try to set it on a site collection without a group, you will get an error.

When setting owners, the specified owners will be added to the already configured owners. Existing owners will not be removed.


Update site collection's classification

m365 spo site set --url --classification MBI

Reset site collection's classification.

m365 spo site set --url --classification

Disable using Microsoft Flow on the site collection

m365 spo site set --url --disableFlows true

Update the visibility of the Microsoft 365 group behind the specified groupified site collection to public

m365 spo site set --url --isPublic true

Update site collection's owners

m365 spo site set --url --owners ","

Allow sharing files in the site collection with guests

m365 spo site set --url --shareByEmailEnabled true

Apply the specified site ID to the site collection

m365 spo site set --url --siteDesignId "eb2f31da-9461-4fbf-9ea1-9959b134b89e"

Update site collection's title

m365 spo site set --url --title "My new site"

Update site collection's description

m365 spo site set --url --description "my description"

Restrict external sharing to already available external users only

m365 spo site set --url --sharingCapability ExistingExternalUserSharingOnly

Set the logo on the site

m365 spo site set --url --siteLogoUrl "/sites/sales/SiteAssets/parker-ms-1200.png"

Unset the logo on the site

m365 spo site set --url --siteLogoUrl ""