Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
not applicable
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
- browser version
- SPFx version
- Node.js version
- etc
This is experienced using the latest versions of PnP.PowerShell (1.10.0) and Microsoft.Online.SharePoint.PowerShell in both PowerShell 7.3 and Windows PowerShell.
Describe the bug / error
When sites are returned using Tenant.GetSitePropertiesByFilter method, the ConditionalAccessPolicy property is erroneously populated with "AllowFullAccess".
Review the following issue for more detail. pnp/PnP-PowerShell#2596. Comment section points towards this method as having the issue.
Steps to reproduce
#Reproduce with PnP.PowerShell
- Connect-PNPOnline -Url -Interactive
- $Sites = Get-PNPTenantSite -Detailed #Can reproduce with our without -Detailed Property
- $Sites[IndexOfSite] | Select ConditionalAccessPolicy #ConditionalAccessPolicy will show AllowFullAccess regardless if it's changed
- Get-PNPTenantSite -Identity | Select ConditionalAccessPolicy #Shows correct property value.
#Alternative with Microsoft.Online.SharePoint.Powershell
- Connect-SPOService -Url
- $Sites = Get-SPOSite -Limit All
- $Sites[IndexOfSite] | Select ConditionalAccessPolicy #ConditionalAccessPolicy will show AllowFullAccess regardless if it's changed
- Get-SPOSite -Identity | Select ConditionalAccessPolicy #Shows correct property value.
Expected behavior
CondtionalAccessPolicy property is returned correctly when using Tenant.GetSitePropertiesByFilter method. So both PNP.PowerShell and Microsoft.Online.SharePoint.Powershell return the correct property value when more than one site is returned using either Get-PNPTenantSite or Get-SPOSite.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
not applicable
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
This is experienced using the latest versions of PnP.PowerShell (1.10.0) and Microsoft.Online.SharePoint.PowerShell in both PowerShell 7.3 and Windows PowerShell.
Describe the bug / error
When sites are returned using Tenant.GetSitePropertiesByFilter method, the ConditionalAccessPolicy property is erroneously populated with "AllowFullAccess".
Review the following issue for more detail. pnp/PnP-PowerShell#2596. Comment section points towards this method as having the issue.
Steps to reproduce
#Reproduce with PnP.PowerShell
#Alternative with Microsoft.Online.SharePoint.Powershell
Expected behavior
CondtionalAccessPolicy property is returned correctly when using Tenant.GetSitePropertiesByFilter method. So both PNP.PowerShell and Microsoft.Online.SharePoint.Powershell return the correct property value when more than one site is returned using either Get-PNPTenantSite or Get-SPOSite.