Getting The provided site url can't be set as a Home site when setting a home site in SharePoint Online

In SharePoint Online, I am using SharePoint online management shell to set a home site. My code is this

https://docs.microsoft.com/en-us/SharePoint/home-site

    $orgName="myorg"
    Connect-SPOService -Url https://$orgName-admin.sharepoint.com
    
    Set-SPOHomeSite -HomeSiteUrl "https://myorg.sharepoint.com/sites/mysite"

However I get 

    Set-SPOHomeSite : [Error ID: 09149788-0a26-4cee-a333-699b81f629d7] The provided site url can't be set as a Home site. Check aka.ms/homesites for 
    cmdlet requirements.
    At C:\set_home_site.ps1:6 char:1
    + Set-SPOHomeSite -HomeSiteUrl "https://myorg.sharepoint.com/sites/mysite"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-SPOHomeSite], ServerException
        + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SPOHomeSite+SetSPHSite

To confirm it was a communication site, I did:

    $site = Get-SPOSite -id "https://myorg.sharepoint.com/sites/mysite"

    $site.Template

and it printed SITEPAGEPUBLISHING#0

Does anyone know what is wrong?

Thanks
Answer
Answer

Hi loverrock,

Thanks for using Microsoft products and posting in the community, I'm glad to offer help.

According to your description, I tested on my side and it worked properly.

 Image

In your case, please first make sure you have installed the current latest version of SharePoint Online Management Shell, because some cmdlet won't work if the shell is not the latest version.

P.S.you can check the version from Control Panel\Programs\Programs and Features.

If the issue persists in the latest version, please try to create a new communication site and try to set the new site to the home site, it would be helpful for us to determine if it is caused by the site itself or your organization.

Looking forward to your feedback.

Best Regards,

Arck

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 9, 2023 Views 645 Applies to: