Skip to content

Commit

Permalink
SPOSharingSettings: Multiple sites returned from Get-PnPTenantSite
Browse files Browse the repository at this point in the history
  • Loading branch information
andikrueger committed Feb 14, 2024
1 parent 62b663c commit 26abeb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
* Fix typo in variable which made it export incorrectly and report that
resource was not in correct state due to testing an incorrect value
FIXES [#3972](https://github.com/microsoft/Microsoft365DSC/issues/3972)
* SPOSharingSettings
* Fixed an issue where the resource would return multiple sites.
FIXES [#2759](https://github.com/microsoft/Microsoft365DSC/issues/2759)
* DEPENDENCIES
* Updated DSCParser to version 1.4.0.2.
* Updated Microsoft.Graph dependencies to version 2.13.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ function Set-TargetResource
Set-PnPTenant @CurrentParameters | Out-Null
if ($SetMySharingCapability)
{
$mysite = Get-PnPTenantSite | Where-Object { $_.Url -match '-my.sharepoint.com/' }
$mysite = Get-PnPTenantSite | Where-Object { $_.Url -match '-my.sharepoint.com/' -and $_.Template -notmatch '^RedirectSite#' }
Set-PnPTenantSite -Identity $mysite.Url -SharingCapability $MySiteSharingCapability
}
}
Expand Down

0 comments on commit 26abeb3

Please sign in to comment.