[Bug] Set-PnPHubSite -EnablePermissionsSync not setting the right property #4187
Replies: 4 comments
-
Just a note that this command simply sets the CSOM property This is the line that sets the property: |
Beta Was this translation helpful? Give feedback.
-
Ok. I have examined the setting more closely. Set-PnPHubSite sets the property always on the hub site. With Set-PnPHubSite -Identity “https://tenant.sharepoint.com/sites/myhubsite” -EnablePermissionsSync On the child site I can switch the option 'Sync hub permissions to this site' on and off. Is it possible to set this switch with PnP PowerShell? This issue is now a question and no longer a bug. |
Beta Was this translation helpful? Give feedback.
-
Thanks @brunostampfli for confirming , moving this to discussion. AFAIK, there's no method available at the moment for this, but maybe someone in the community might have a better answer |
Beta Was this translation helpful? Give feedback.
-
I found a solution myself:
|
Beta Was this translation helpful? Give feedback.
-
Reporting an Issue or Missing Feature
I would like to enable / disable 'Sync hub permissions to this site'.
Set-PnPHubSite -EnablePermissionsSync
should do this.Expected behavior
I use:
Set-PnPHubSite -Identity "https://tenant.sharepoint.com/sites/myhubsite" -EnablePermissionsSync
and
Set-PnPHubSite -Identity "https://tenant.sharepoint.com/sites/myhubsite" -EnablePermissionsSync:$false
My expectation is these commands should set the 'Sync hub permission to this site' On or Off.
Actual behavior
With these commands I can hide or show the controls on the Site Information Page, but the sync setting is NOT set Off or On.
Steps to reproduce behavior
Run:
Set-PnPHubSite -Identity "https://tenant.sharepoint.com/sites/myhubsite" -EnablePermissionsSync:$false
This hides the setting, but it should set set setting to Off.
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name "PnP.PowerShell" -ListAvailable
)I tested this with 2.9.0 and 1.12.0.
Which operating system/environment are you running PnP PowerShell on?
Beta Was this translation helpful? Give feedback.
All reactions