Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeamsGroupPolicyAssignment FIXES #5527 #5544

Open
wants to merge 4 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* Fixing issue with the way the QrCodeImage property was exported and handled.
* IntuneFirewallPolicyWindows10
* Fix export of properties that appear multiple times in subsections.
* TeamsGroupPolicyAssignment
* FIXES [[#5527](https://github.com/microsoft/Microsoft365DSC/issues/5527)]
* M365DSCDRGUtil
* Improve settings catalog handling for nested objects.
* M365DSCResourceGenerator
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