Skip to content

Commit

Permalink
Merge pull request #5544 from swisscom/5527-TeamsGroupPolicyAssignmen…
Browse files Browse the repository at this point in the history
…t-fix-bug

TeamsGroupPolicyAssignment FIXES #5527
  • Loading branch information
ykuijs authored Jan 15, 2025
2 parents 256abe6 + ef51479 commit 597160f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* initial release
* IntuneVPNConfigurationPolicyAndroidWork
* Initial release
* TeamsGroupPolicyAssignment
* FIXES [[#5527](https://github.com/microsoft/Microsoft365DSC/issues/5527)]

# 1.25.108.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ function Get-TargetResource
}

Write-Verbose -Message "Getting GroupPolicyAssignment with PolicyType {$PolicyType} for Group {$($Group.DisplayName)}"
$GroupPolicyAssignment = Get-CsGroupPolicyAssignment -GroupId $Group.Id -PolicyType $PolicyType -ErrorAction SilentlyContinue
$AllGroupPolicyAssignment = Get-CsGroupPolicyAssignment -ErrorAction SilentlyContinue
$GroupPolicyAssignment = $AllGroupPolicyAssignment | Where-Object{$_.GroupId -eq $Group.Id -and $_.PolicyType -eq $PolicyType}
if ($null -eq $GroupPolicyAssignment)
{
Write-Verbose -Message "GroupPolicyAssignment not found for Group {$GroupDisplayName}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
}

Mock -CommandName Find-CsGroup -MockWith {
return @(
@{
[PSCustomObject]@{
Displayname = 'TestGroup'
}
)
Id = '00000000-0000-0000-0000-000000000000'
}
}

Mock -CommandName get-csTeamsCallingPolicy -MockWith {
Expand Down

0 comments on commit 597160f

Please sign in to comment.