Skip to content

[BUG] Set-PnPHomeSite throws an error when you have multiple Viva Connections #3978

@ryder-cayden

Description

@ryder-cayden

Reporting an Issue

Running the Set-PnPHomeSite when you have multiple Viva Connections throws the following error:
"Set-PnPHomeSite: Operation is not valid due to the current state of the object."

Expected behavior

The Home site should be configured without any error.

Actual behavior

There is an error when running that cmdlet

Steps to reproduce behavior

  1. Go to Office 365 admin center -> Settings -> Viva -> Viva connections
  2. Ensure you have multiple Viva Connections. In my case I have the following:
  1. Open up PowerShell and run the following command:
    Set-PnpHomeSite -HomeSiteUrl https://tenantName.sharepoint.com/sites/intranet
    (please change the HomeSiteUrl parameter accordingly)
  2. The following exception will be thrown:
    Set-PnPHomeSite: Operation is not valid due to the current state of the object.

What is the version of the Cmdlet module you are running?

2.3.0 and 2.4.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions