SOLVED

Hub name "Hidden in navigation" - Set via PowerShell or API

Brass Contributor

It appears that there is no way to programmatically change the "Hidden in navigation" value in Hub site settings.  Is this true?

 

Hub settings - Hidden in navigation.png

2 Replies

@johndpalm You can via the REST API by making a POST to 

_api/HubSites/GetById('<yourHubsiteId>')

You can get your Original Hubsite Object by doing a GET to that endpoint. Then update the property "HideNameInNavigation" to true or false.

best response confirmed by VI_Migration (Silver Contributor)
Solution

@johndpalm 

 

You can easily set Hidden in navigation setting using Set-PnPHubSite cmdlet PnP PowerShell. You need to set the HideNameInNavigation using this cmdlet. 

 

Check this reference for more information: Set-PnPHubSite 


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@johndpalm 

 

You can easily set Hidden in navigation setting using Set-PnPHubSite cmdlet PnP PowerShell. You need to set the HideNameInNavigation using this cmdlet. 

 

Check this reference for more information: Set-PnPHubSite 


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

View solution in original post