Skip to content

m365 spo homesite set #6489

@reshmee011

Description

@reshmee011

Usage

m365 spo homesite set

Description

Updates the configuration of a SharePoint home site

Options

Option Description
-u, --url <url> Url of the Home Site
--draftMode [draftMode] Set draft status. Valid values are: true, false.
--audienceIds [audienceIds] Comma-separated list of M365 group Ids to set as audiences. Specify either audienceIds or audienceNames, but not both.
--audienceNames [audienceNames] Comma-separated list of M365 group names to set as audiences. Specify either audienceIds or audienceNames, but not both.
--targetedLicenseType [TargetedLicenseType] Value of either everyone, frontLineWorkers or informationWorkers.
--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart] Specifies whether the home site is the default start for Viva Connections. Accepts true or false.
--order [order] Order of the home site.

Examples

Disables the Home site viva connection experience

m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal  --draftMode false

Enables the Home site viva connection experience

m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal  --draftMode true

Set the audience to everyone

m365 spo homesite set -u https://contoso.sharepoint.com/sites/contosoportal  --TargetedLicenseType "everyone"

Set the audience to frontline workers

m365 spo homesite set -u https://contoso.sharepoint.com/sites/contosoportal  --TargetedLicenseType "frontLineWorkers"

Set the audience to information workers

m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal  --TargetedLicenseType "informationworkers"

Set the audience to M365 groups using M365 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 to M365 groups using M365 Groups Names

m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal  --audienceNames "Marketing, IT department"

Set vivaConnectionsDefaultStart

m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal  --vivaConnectionsDefaultStart false

Default properties

No response

Additional Info

This is to fix the bug #6066 which requires a refactor to use a different REST endpoint UpdateTargetedSite following the changes to the SharePoint Home Site being merged into Viva Connection Experiences.

The parameter vivaConnectionsDefaultStart seems redundant and I can't find how to use the REST endpoint SetSPHSiteWithConfiguration and hence can be removed.

Happy to work on it after peer review.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions