From c2cd5e7860647f3a1285814f7a0e6ee04fe1cc31 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Wed, 21 Apr 2021 11:14:35 -0400 Subject: [PATCH 1/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f8c1dd49..05b451258f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ * Fixed issue in most EXO resources where AzureAD App information was not returned by the Get-TargetResource function; -1.21.331.1 +# 1.21.331.1 * AADApplication * Added support for API Permissions; From d3cd400a94a667e30e2633647881f315ae80211c Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Wed, 21 Apr 2021 11:19:28 -0400 Subject: [PATCH 2/2] Release 1.21.421.2 --- CHANGELOG.md | 6 +++ .../MSFT_EXOAcceptedDomain.psm1 | 15 ++++++-- .../MSFT_EXOActiveSyncDeviceAccessRule.psm1 | 15 ++++++-- .../MSFT_EXOAddressBookPolicy.psm1 | 15 ++++++-- .../MSFT_EXOAddressList.psm1 | 29 +++++++++++--- .../MSFT_EXOAntiPhishPolicy.psm1 | 15 ++++++-- .../MSFT_EXOSafeLinksPolicy.psm1 | 15 ++++++-- .../MSFT_SCCaseHoldPolicy.psm1 | 15 ++++++-- .../MSFT_SCDeviceConfigurationPolicy.psm1 | 17 +++++++-- Modules/Microsoft365DSC/Microsoft365DSC.psd1 | 38 +++++++++---------- 10 files changed, 131 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b451258f..fafac3127f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log for Microsoft365DSC +# 1.21.421.2 + +* MISC + * Updated the SkipModuleReload logic for a dozen of EXO modules + which were failing authentication; + # 1.21.421.1 * AADConditionalAccessPolicy diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 index 17b55b83db..34934a69e6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 @@ -55,9 +55,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting configuration of Accepted Domain for $Identity" - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 index d5ec9ff932..90fc1ed1dc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 @@ -53,9 +53,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting Active Sync Device Access Rule configuration for $Identity" - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 index caf141aa7a..fb342503fb 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 @@ -55,9 +55,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting Address Book Policy configuration for $Name" - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 index e2e914d539..c5a0dff89d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 @@ -124,9 +124,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting configuration of AddressList for $Name" - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") @@ -358,9 +367,17 @@ function Set-TargetResource $currentAddressListConfig = Get-TargetResource @PSBoundParameters - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 index 9d4c52d69c..e2f4f20e41 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 @@ -153,9 +153,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting configuration of AntiPhishPolicy for $Identity" - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 index 11e7074d11..a32e717956 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 @@ -75,9 +75,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting configuration of SafeLinksPolicy for $Identity" - $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 index 52223c226f..acd1aff594 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 @@ -43,9 +43,18 @@ function Get-TargetResource ) Write-Verbose -Message "Getting configuration of SCCaseHoldPolicy for $Name" - $ConnectionMode = New-M365DSCConnection -Platform 'SecurityComplianceCenter' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 index 7236de173d..2e5d217d5d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 @@ -27,10 +27,19 @@ function Get-TargetResource ) Write-Verbose -Message "Getting configuration of Device Configuration Policy for $Name" - $ConnectionMode = New-M365DSCConnection -Platform 'SecurityComplianceCenter' ` - -InboundParameters $PSBoundParameters ` - -SkipModuleReload $Global:CurrentModelIsExport - + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } + #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "") $data = [System.Collections.Generic.Dictionary[[String], [String]]]::new() diff --git a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 index f246f52a13..b3e9ada052 100644 --- a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 +++ b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 @@ -11,7 +11,7 @@ # RootModule = '' # Version number of this module. - ModuleVersion = '1.21.421.1' + ModuleVersion = '1.21.421.2' # Supported PSEditions # CompatiblePSEditions = @() @@ -176,29 +176,25 @@ IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true' # ReleaseNotes of this module - ReleaseNotes = "# 1.21.414.1 + ReleaseNotes = "# 1.21.421.2 + + * MISC + * Updated the SkipModuleReload logic for a dozen of EXO modules + which were failing authentication; + + # 1.21.421.1 * AADConditionalAccessPolicy - * Fixed an issue with the default values for device states; - * EXOHostedContentFilterPolicy - * Fixed issue where EndUserSpamNotificationCustomFromName was - not properly returned from the Get-TargetResource function; + * Fix to allow 'undefined' as a value for multiple parameters; * EXOTransportRule - * New resource; - * O365AdminAuditLogConfig - * Fixed issue where the Set-TargetResource stopped being - executed if an error was encountered; - * TeamsTeam - * Fix format issue with owner issue # 1143 - * DEPENDENCIES - * Updated AzureADPreview to version 2.0.2.134; - * Updated Microsoft.Graph.Authentication to version 1.4.2; - * Updated Microsoft.Graph.Planner to version 1.4.2; - * Updated Microsoft.Graph.Teams to version 1.4.2; - * Updated Microsoft.PowerApps.Administration.PowerShell to version - 2.0.112; - * Updated MSCloudLoginAssistant to version 1.0.51; - * Updated PnP.PowerShell to version 1.5.0;" + * Fixed schema to support Service Principal Auth; + * TeamsChannelTab + * Fixed typo in parameter 'TeamId'; + * MISC + * Refactor of all EXO resources to fixes for Set-TargetResource + functions where Service Principal was used to authenticate; + * Refactored connections across all resources to help with + Telemetry regarding what auth method users are leveraging." # Flag to indicate whether the module requires explicit user acceptance for install/update # RequireLicenseAcceptance = $false