spo homesite set
Updates an existing SharePoint home site.
Usage
m365 spo homesite set [options]
Options
-u, --url <url>The URL of the site to set as Home site.
--draftMode [draftMode]Set draft status. Valid values are:
true,false.--audienceIds [audienceIds]Comma-separated list of group Ids to set as audiences. Specify either
audienceIdsoraudienceNames, but not both.--audienceNames [audienceNames]Comma-separated list of group names to set as audiences. You must use either
audienceIdsoraudienceNames, but not both. Pass''to clear audience.--targetedLicenseType [targetedLicenseType]Value of either
everyone,frontLineWorkersorinformationWorkersto create an experience for a distinct audience by license type.--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]Specifies whether the home site is the default start for Viva Connections. Accepts
trueorfalse.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,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.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
To use this command you must be a Global or SharePoint administrator.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| SharePoint | AllSites.FullControl |
| Resource | Permissions |
|---|---|
| SharePoint | Sites.FullControl.All |
Examples
Sets the home site to the provided site collection url and sets the Viva Connections landing experience to the SharePoint home site
m365 spo homesite set --url https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart true
Set the home site in draft mode
m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --draftMode true
Set the audience to everyone
m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --targetedLicenseType "everyone"
Set the audience to groups using groups Ids
m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceIds "978b5280-4f80-47ea-a1db-b0d1d2fb1ba4,21af775d-17b3-4637-94a4-2ba8625277cb"
Set the audience using their display name
m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceNames "Marketing, IT department"
Clear the audience and set to draft
m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceNames '' --draftMode true
Configure multiple options
m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceNames 'Marketing, IT department' --draftMode true --targetedLicenseType "everyone" --vivaConnectionsDefaultStart true
Response
Standard response
- JSON
- Text
- CSV
- Markdown
{
"Audiences": [
{
"Email": "active@contoso.onmicrosoft.com",
"Id": "7a1eea7f-9ab0-40ff-8f2e-0083d9d63451",
"Title": "active Members"
}
],
"IsInDraftMode": true,
"IsVivaBackendSite": false,
"SiteId": "431d7819-4aaf-49a1-b664-b2fe9e609b63",
"TargetedLicenseType": 2,
"Title": "The Landing",
"Url": "https://contoso.sharepoint.com/sites/TheLanding",
"VivaConnectionsDefaultStart": true,
"WebId": "626c1724-8ac8-45d5-af87-c07c752fab75"
}
Audiences : [{"Email":"active@contoso.onmicrosoft.com","Id":"7a1eea7f-9ab0-40ff-8f2e-0083d9d63451","Title":"active Members"}]
IsInDraftMode : true
IsVivaBackendSite : false
SiteId : 431d7819-4aaf-49a1-b664-b2fe9e609b63
TargetedLicenseType : 2
Title : The Landing
Url : https://contoso.sharepoint.com/sites/TheLanding
VivaConnectionsDefaultStart: true
WebId : 626c1724-8ac8-45d5-af87-c07c752fab75
IsInDraftMode,IsVivaBackendSite,SiteId,TargetedLicenseType,Title,Url,VivaConnectionsDefaultStart,WebId
1,0,431d7819-4aaf-49a1-b664-b2fe9e609b63,2,The Landing,https://contoso.sharepoint.com/sites/TheLanding,1,626c1724-8ac8-45d5-af87-c07c752fab75
# spo homesite set --url "https://contoso.sharepoint.com/sites/TheLanding" --vivaConnectionsDefaultStart "true" --audienceNames "active"
Date: 7/27/2025
## The Landing (https://contoso.sharepoint.com/sites/TheLanding)
Property | Value
---------|-------
IsInDraftMode | true
IsVivaBackendSite | false
SiteId | 431d7819-4aaf-49a1-b664-b2fe9e609b63
TargetedLicenseType | 2
Title | The Landing
Url | https://contoso.sharepoint.com/sites/TheLanding
VivaConnectionsDefaultStart | true
WebId | 626c1724-8ac8-45d5-af87-c07c752fab75
More information
- SharePoint home sites: a landing for your organization on the intelligent intranet: https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/SharePoint-home-sites-a-landing-for-your-organization-on-the/ba-p/621933