Skip to content

[BUG] Add-PnPHubToHubAssociation silently fails if target is not registered as a hub site #1365

Closed
@Andy-Dawson

Description

@Andy-Dawson

Reporting an Issue or Missing Feature

Using the Add-PnPHubToHubAssociation command silently fails if the target specified is not registered as a hub site. Behaviour is the same as if both source and target are registered as hub sites and the connection succeeds.

Expected behavior

An error message if the target is not registered as a hub site.

Actual behavior

Command completes with no reported output, however as the target is not registered as a hub site, no connection is made.
Site is registered as a hub site, SiteB is not:
image

Steps to reproduce behavior

  1. Create Communication site 'SiteA'.
  2. Register SiteA as a hub site.
  3. Create Communication site 'SiteB'
  4. Use the following PnP PowerShell commands to attempt to associate the sites:
    Connect-PnPOnline
    Add-PnPHubToHubAssociation -SourceUrl https://tenant.sharepoint.com/sites/SiteA -TargetUrl https://tenant.sharepoint.com/sites/SiteB

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

1.8.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

No one assigned

    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