Skip to content

Commit

Permalink
Merge pull request #3894 from pkernevez/fix-teams-compliance-policy
Browse files Browse the repository at this point in the history
TeamsComplianceRecordingPolicy: ComplianceRecordingApplications Ids are strings not objects
  • Loading branch information
NikCharlebois authored Nov 30, 2023
2 parents ed9cf9c + 302f4e7 commit a0f379a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
* Updated DSCParser to version 1.4.0.1.
* Updated Microsoft.Graph to version 2.10.0.
* Updated MSCloudLoginAssistant to version 1.1.0.
* TeamsTeam
* Fixes incompatible type for ComplianceRecordingApplications, expected string[] but receive object[]
FIXES: [#3890](https://github.com/microsoft/Microsoft365DSC/issues/3890)
* M365DSCDRGUtil
* Added ConvertFrom-IntunePolicyAssignment and ConvertTo-IntunePolicyAssignment
FIXES [#3892](https://github.com/microsoft/Microsoft365DSC/issues/3892)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function Get-TargetResource
}
$recordApplicationIds = @()
foreach ($app in $recordingApplications) {
$recordApplicationIds += @{Id=$app.Id}
$recordApplicationIds += $app.Id
}

Write-Verbose -Message "Found an instance with Identity {$Identity}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Configuration Example
{
TeamsComplianceRecordingPolicy 'Example'
{
ComplianceRecordingApplications = @();
ComplianceRecordingApplications = @('qwertzuio-abcd-abcd-abcd-qwertzuio');
Credential = $Credscredential;
DisableComplianceRecordingAudioNotificationForCalls = $False;
Enabled = $False;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @(@{Id="123456"})
ComplianceRecordingApplications = @("123456")
Identity = 'FakeStringValue'
Ensure = 'Present'
Credential = $Credential
Expand Down Expand Up @@ -95,7 +95,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @(@{Id='123456'})
ComplianceRecordingApplications = @('123456')
Identity = 'FakeStringValue'
Ensure = 'Absent'
Credential = $Credential
Expand Down Expand Up @@ -124,7 +124,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
$Result = (Get-TargetResource @testParams)
$Result.Ensure | Should -Be 'Present'
$Result.ComplianceRecordingApplications.Length | Should -Be 1
$Result.ComplianceRecordingApplications[0].Id | Should -Be '123456'
$Result.ComplianceRecordingApplications[0] | Should -Be '123456'
Should -Invoke -CommandName Get-CsTeamsComplianceRecordingPolicy -Exactly 1
Should -Invoke -CommandName Get-CsTeamsComplianceRecordingApplication -ParameterFilter {$Filter -eq 'FakeStringValue/*'} -Exactly 1

Expand All @@ -147,7 +147,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @(@{Id='123456'})
ComplianceRecordingApplications = @('123456')
Identity = 'FakeStringValue'
Ensure = 'Present'
Credential = $Credential
Expand Down Expand Up @@ -184,7 +184,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @{Id='123456'}
ComplianceRecordingApplications = @('123456')
Identity = 'FakeStringValue'
Ensure = 'Present'
Credential = $Credential
Expand Down

0 comments on commit a0f379a

Please sign in to comment.