SOLVED

SharePoint Hub Site Creation - Problem with Register-SPOHubSite

Copper Contributor

Hello. New to the community :) . I'm trying to convert a Communication site to a Hub Site using the SPO Powershell Command Register-SPOHubSite but when I run it, it asks the following:

 

cmdlet Register-SPOHubSite at command pipeline posistion 1

Supply values for the following parameters:

Principals[0]:

 

I'm new to powershell so I don't know what values it's wanting or if I'm just doing something wrong...Thanks for any assistance! 

12 Replies
Can you paste your commands? Ok can replace org name or you want in the urls but should just be register-spohubsite -site “url”

Hi Chris,

 

Can you please try like below

Syntax : Register-SPOHubSite -Site <Communication site url>

Example : Register-SPOHubSite -Site https://xxxxxxx.sharepoint.com/sites/MyHubSite

Hi Chris. Thank you for your response. Yes here is what I tried:

Capture.PNG

Hi Jenkins. Thanks for your response. Yes I tried the following:

 

Capture.PNG

That looks like a lot of sub sites in that URL. The hub sites need to be a site collection root site. Shouldn’t be more than tenant.sharepoint.com/sites/sitename for url. “Teams” being a custom site collection naming scheme may be causing issue but not sure there. First let us know if your trying to go a sub site cause that would be the cause.

Hi Chris,

 

I tried using https://xxxx.sharepoint.com/teams/sitecollection, it is working.

 

Could you please Download and install the SharePoint Online Management Shell and try. maybe latest  version missing. 

That was going to be my next suggestion but still seemed that the url is a sub site. Will see what Chris says!

 

principals[0] are list of people allowed to add sites to the hub.

principals are assigned to the attribute permissions

 

best response confirmed by Chris Reyes (Copper Contributor)
Solution
Hello Chris,

If you have the latest version of SPO Management Shell installed then the Principals[0] parameter shows up. These are a list of users allowed to join modern sites to the hub. You can skip this parameter by hitting Enter, you can use an Azure AD Security Group or a list of users.
I hope this helps.

Hi Chris,

as Ovi and Philippe already mentioned, the Principals parameter set the permissions for
a) a single user via providing UPN
b) a group of several users via providing an email-enabled security group or
c) all site owners in your organization via just press Enter
... to be able to add sites to this Hub-Site.
This procedure is also explained here: https://support.office.com/en-us/article/create-a-hub-site-in-sharepoint-online-92bea781-15d8-4bda-8...

 

Happy SharePointing! ;)

Hello. Yes, this did the trick! Thank you. I simply added the user accounts I wanted to have the ability to join Sites to the Hub and I successfully completed the conversion.

 

And thanks to everyone for their responses!  

1 best response

Accepted Solutions
best response confirmed by Chris Reyes (Copper Contributor)
Solution
Hello Chris,

If you have the latest version of SPO Management Shell installed then the Principals[0] parameter shows up. These are a list of users allowed to join modern sites to the hub. You can skip this parameter by hitting Enter, you can use an Azure AD Security Group or a list of users.
I hope this helps.

View solution in original post