Skip to content

Bug report: m365 spo hubsite list --includeAssociatedSites doesn't include associated sites in the result #3400

@Jwaegebaert

Description

@Jwaegebaert

Description

When I use the command m365 spo hubsite list with the option --includeAssociatedSites, I would expect the result to include the associated sites from the hubsite. If we take a look at the docs we can see that the option is only available when the output type is JSON, which is the new default type since v4, but this isn't the case. The option --includeAssociatedSites can only be used in conjunction with --output json at the moment, which is quite verbose.

Looking at the docs again. At the remarks header, it states that the output type is text by default. Which is no longer the case.

Steps to reproduce

Run the command

m365 spo hubsite list --includeAssociatedSites

Expected results

Returns a list of all the available hubsites within your tenant, including the associated sites in the result.

Actual results

Returns a list of all the available hubsites within your tenant, but doesn't include the associated sites.

[
  {
    "Description": null,
    "EnablePermissionsSync": false,
    "EnforcedECTs": null,
    "EnforcedECTsVersion": 0,
    "HideNameInNavigation": false,
    "ID": "9ff01368-1183-4cbb-82f2-92e7e9a3f4ce",
    "LogoUrl": null,
    "ParentHubSiteId": "00000000-0000-0000-0000-000000000000",
    "PermissionsSyncTag": 0,
    "RequiresJoinApproval": false,
    "SiteDesignId": "00000000-0000-0000-0000-000000000000",
    "SiteId": "9ff01368-1183-4cbb-82f2-92e7e9a3f4ce",
    "SiteUrl": "https://contoso.sharepoint.com/sites/Examplesite2",
    "Targets": null,
    "TenantInstanceId": "21d86952-3c30-45e2-bd84-a520efdbd413",
    "Title": "Examplesite2"
  },
  {
    "Description": null,
    "EnablePermissionsSync": false,
    "EnforcedECTs": null,
    "EnforcedECTsVersion": 0,
    "HideNameInNavigation": false,
    "ID": "a9dc96c0-2b64-4860-8f7c-411d143c1ccf",
    "LogoUrl": null,
    "ParentHubSiteId": "00000000-0000-0000-0000-000000000000",
    "PermissionsSyncTag": 0,
    "RequiresJoinApproval": false,
    "SiteDesignId": "00000000-0000-0000-0000-000000000000",
    "SiteId": "a9dc96c0-2b64-4860-8f7c-411d143c1caf",
    "SiteUrl": "https://contoso.sharepoint.com/sites/Examplesite",
    "Targets": null,
    "TenantInstanceId": "21d86952-3c30-45e2-bd84-a520efdbd413",
    "Title": "Example Site"
  }
]

Diagnostics

n/a

CLI for Microsoft 365 version

V5.4.0

nodejs version

16.11.1

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

n/a

Additional Info

n/a

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions