diff --git a/CHANGELOG.md b/CHANGELOG.md index d099f0905f..30dd94522b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,19 @@ * AAD * Added ApplicationSecret auth method to multiple resources -* EXORecipientPermission - * Added logic to update an existing recipient's permissions. * EXOEOPProtectionPolicyRule * Added support for AccessTokens. * EXOExternalInOutlook * Added support for AccessTokens. +* EXOMailContact + * Changed how empty arrays are returned. +* EXOPlace + * Changed how empty arrays are returned. +* EXORecipientPermission + * Added logic to update an existing recipient's permissions. +* EXOTransportRule + * Changed how empty arrays are returned. + * IntuneAndroidManagedStoreAppConfiguration * Initial release. * TeamsUserPolicyAssignment @@ -20,7 +27,7 @@ * MISC * Removed hardcoded Graph urls and replaced by MSCloudLoginAssistant values. * DEPENDENCIES - * Updated DSCParser to version 2.0.0.13. + * Updated DSCParser to version 2.0.0.14. * Updated Microsoft.Graph to version 2.25.0. * Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.200. * Updated MicrosoftTeams to version 6.7.0. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 index 8553bf9155..cb39fd5900 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 @@ -268,6 +268,10 @@ function Get-TargetResource { $result."ExtensionCustomAttribute$i" = $contact."ExtensionCustomAttribute$i" } + else + { + $result."ExtensionCustomAttribute$i" = @() + } } Write-Verbose -Message "Found Mail Contact $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 index 227fc1f57e..9327331b4d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 @@ -181,6 +181,12 @@ function Get-TargetResource } } + $TagsValue = [Array] $place.Tags + if ($place.Tags -eq $null) + { + $TagsValue = @() + } + $result = @{ Identity = $place.Identity AudioDeviceName = $place.AudioDeviceName @@ -203,7 +209,7 @@ function Get-TargetResource PostalCode = $place.PostalCode State = $place.State Street = $place.Street - Tags = [Array] $place.Tags + Tags = $TagsValue VideoDeviceName = $place.VideoDeviceName Credential = $Credential Ensure = 'Present' diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 index 0cea524e88..89055e9a3f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 @@ -967,6 +967,16 @@ function Get-TargetResource TenantId = $TenantId AccessTokens = $AccessTokens } + $inputParams = (Get-Command 'Get-TargetResource').Parameters + foreach ($key in $inputParams.Keys) + { + $propertyInfo = $inputParams.$key + $curVar = Get-Variable -Name $key -ErrorAction SilentlyContinue + if ($propertyInfo.ParameterType.Name -eq 'String[]' -and $curVar -ne $null -and $curVar.Value -eq $null) + { + $result.$key = @() + } + } # Formats DateTime as String if ($null -ne $result.ActivationDate) diff --git a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 index 39db52ebef..e04173694f 100644 --- a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 +++ b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 @@ -18,7 +18,7 @@ }, @{ ModuleName = 'DSCParser' - RequiredVersion = '2.0.0.13' + RequiredVersion = '2.0.0.14' }, @{ ModuleName = 'ExchangeOnlineManagement'