[BUG] Get-PnPTenantSite -Detailed does return RestrictedAccessControl property correctly, returns False for all sites queries
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 904
- Forks
- 407
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 10
Description
Notice
Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:
- Are you using
Invoke-PnPSiteTemplateorGet-PnPSiteTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/pnpframework/issues. - Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
- If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/powershell/tree/master/src/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/pnpframework/issues
Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
"Get-PnPTenantSite -Detailed" does return RestrictedAccessControl property correctly, returns False for all sites when requesting all sites on tenant. Individual site requests work properly.
Expected behavior
Please describe what output you expect to see from the PnP PowerShell Cmdlets
Should return the property correctly when used in conjunction to retrieve all sites.
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.
Returns False for all sites when requesting all sites on tenant. Individual site requests work properly.
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
$CsvPath = "E:\Temp\SharePointSites.csv"
$sites = Get-PnPTenantSite -Detailed
$siteReport = $sites | Select-Object Title,
OwnerName,
Owneremail,
Owner,
LastContentModifiedDate,
TeamsChannelType,
IsHubSite,
storageUsageCurrent,
ArchiveStatus,
LockState,
SiteId,
Template,
RestrictedAccessControl,
SharingCapability,
RestrictContentOrgWideSearch
$siteReport | Export-Csv -Path $CsvPath -NoTypeInformation -Encoding UTF8
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)
3.4.1
Which operating system/environment are you running PnP PowerShell on?
- [X ] Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Get-PnPTenantSite implementation under src/Commands, then compare the -Detailed path for all tenant sites with the individual-site retrieval path. Run the supplied Get-PnPTenantSite -Detailed reproduction and verify that RestrictedAccessControl reflects each site's value in the exported results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100