question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add new option to the spo hub site list command

See original GitHub issue

I would like to propose to extend the command spo hubsite list with a new option --includeAssociatedSites, which will be the o365cli version of the info presented in the column “Hub site association” that is shown in the “Active Sites” overview of the new Central Admin experience.

image

Currently the spo hubsite list commands shows something like the following:

image

In the new situation, if the user provides the --includeAssociatedSites option, something like the following would be shown:

image

The JSON for the new situation would be the same as in the current situation, but with an additional AssociatedSites property for each Hub element:

[{
    "Description": null,
    "ID": "77f50c57-c40a-4666-83f5-d325567512be",
    "LogoUrl": null,
    "RequiresJoinApproval": false,
    "SiteDesignId": "00000000-0000-0000-0000-000000000000",
    "SiteId": "77f50c57-c40a-4666-83f5-d325567512be",
    "SiteUrl": "https://contoso.sharepoint.com/sites/RootHub",
    "Targets": null,
    "TenantInstanceId": "4b336ff8-ab07-4830-1981-13d9ad7baf63",
    "Title": "Awesome Hub",
    "AssociatedSites": [{
            "Title": "Hub sub 1",
            "SiteUrl": "https://contoso.sharepoint.com/sites/hubsub1"
        }, {
            "Title": "Hub sub 3",
            "SiteUrl": "https://contoso.sharepoint.com/sites/hubsub3"
        }, {
            "Title": "Hub sub 4",
            "SiteUrl": "https://contoso.sharepoint.com/sites/hubsub4"
        }, {
            "Title": "Hub sub x",
            "SiteUrl": "https://contoso.sharepoint.com/sites/hubsubx"
        }
    ]
}]

Since the hub site REST API currently does not provide the required info, we would retrieve the associated sites info in the same way as the “Active Sites” overview of the new Central Admin experience does; by retrieving this info from list DO_NOT_DELETE_SPLIST_TENANTADMIN_AGGREGATED_SITECOLLECTIONS. When we use a tool like Fiddler we can see that to get the required hubsite info for the “Active Sites” overview the data from the /_api/HubSites and _api/web/lists/GetByTitle(‘DO_NOT_DELETE_SPLIST_TENANTADMIN_AGGREGATED_SITECOLLECTIONS’) calls are combined.

I understand that since this isn’t done via an exposed API this all could change in a future update to SPO and thus that this functionality will break in the o365cli, however, I also do think that this is quite conviniant info about hub sites that some users working with hub sites really would like to retrieve via the o365cli.

What do you guys think? Is this something that could be a useful addition to the o365cli?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
waldekmastykarzcommented, Jan 2, 2019

You could store the batch size in a private class property and then in the test set it to a smaller number. To do this you would need to cast the class instance to any, but other than that it should work just fine.

1reaction
arjenbloemsmacommented, Dec 14, 2018

Yeah! I would really like that.

And thanks 👊🏻

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize the navigation on your SharePoint site
Select Edit to the right of the hub site navigation bar. · Hover in between the existing links in the menu where you...
Read more >
How to Create Hub Sites in SharePoint Online: Step by Step
Navigate to the new SharePoint Online Admin Center. · Click on Active Sites to see a list of all the site collections. ·...
Read more >
hubsite set - CLI for Microsoft 365
This command is based on a SharePoint API that is currently in preview and is subject to change once the API reached general...
Read more >
What Are The Stages In Setting Up A Site Design For Hub Sites
Adding nodes to the site navigation and creating a new list are best examples for such changes. The main functionality of the site...
Read more >
How can I have a list of all the sites that are part of the same ...
Then from the “Active sites” dashboard click on “Hub” -> Filter by Hub -> then select your hub site – this will list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found