-
Notifications
You must be signed in to change notification settings - Fork 381
Description
Reporting an Issue or Missing Feature
Get-PnPTenantSite to return details on all sites in the tenant then it does not return the correct values for RestrictContentOrgWideSearch or RestrictedAccessControl even when the values are set via Set-PnPTenantSite or via the SharePoint Admin center.
If I use
https://nikkichapple.sharepoint.com/teams/13Team
Expected behavior
When I set the Restricted Content Discovery or the Restricted Access Control values using with PNP PowerShell
Set-PnPTenantSite -Identity $testsite -RestrictContentOrgWideSearch $true
Set-PnPTenantSite -Identity $testsite -RestrictedAccessControl $true
Or directly in the SharePoint admin center
Then I run Get-PnPTenantSite -Detailed | ft Url, Template, ArchiveStatus, TeamsChannelType, RestrictContentOrgWideSearch, RestrictedAccessControl
I would expect RestrictContentOrgWideSearch and RestrictedAccessControl to equal True
Actual behavior
The RestrictContentOrgWideSearch and RestrictedAccessControl values are shown as False

However if I run Get-PnPTenantSite for a specific site
Get-PnPTenantSite -Identity $testsite | ft Url, Template, ArchiveStatus, TeamsChannelType, RestrictContentOrgWideSearch, RestrictedAccessControl
the the values are correctly returned as True

Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
Example of setting site properties on a specific site
$testsite1 = "https://nikkichapple.sharepoint.com/teams/13Team"
Set site to restrict content org-wide search and enable restricted access control
Set-PnPTenantSite -Identity $testsite1 -RestrictContentOrgWideSearch $true
Set-PnPTenantSite -Identity $testsite1 -RestrictedAccessControl $true
Get specific site with detailed information
Get-PnPTenantSite -Identity $testsite1 | ft Url, Template, ArchiveStatus, TeamsChannelType, RestrictContentOrgWideSearch, RestrictedAccessControl
Get all sites with detailed information
Get-PnPTenantSite -Detailed | ft Url, Template, ArchiveStatus, TeamsChannelType, RestrictContentOrgWideSearch, RestrictedAccessControl
What is the version of the Cmdlet module you are running?
Manifest 3.1.0 PnP.PowerShell
Which operating system/environment are you running PnP PowerShell on?
- [yes ] Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify