From 727843e3ccdcbf8b0a238aec076586333f9455c9 Mon Sep 17 00:00:00 2001 From: Fabien Tschanz Date: Mon, 11 Nov 2024 20:09:30 +0100 Subject: [PATCH 1/6] Fix property naming and settings catalog handling --- CHANGELOG.md | 8 +++++ ...alAdministratorPasswordSolutionPolicy.psm1 | 10 +++---- ...nistratorPasswordSolutionPolicy.schema.mof | 2 +- ...T_IntuneSecurityBaselineMicrosoftEdge.psm1 | 30 +++++++++++++++++++ ...neSecurityBaselineMicrosoftEdge.schema.mof | 3 +- .../1-Create.ps1 | 2 +- .../2-Update.ps1 | 2 +- .../Modules/M365DSCDRGUtil.psm1 | 2 +- .../M365DSCIntuneSettingsCatalogUtil.psm1 | 3 +- 9 files changed, 51 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e122cdcfb..6c5c7d350b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,22 @@ # UNRELEASED +* IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy + * Update property `PasswordAgeDays_AAD` to be lower-case. + FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (1/2) * IntuneAntivirusExclusionsPolicyMacOS * Initial release. * IntuneAntivirusPolicyWindows10SettingCatalog * Update properties to be upper-case. Fixes [#5373](https://github.com/microsoft/Microsoft365DSC/issues/5373) +* IntuneSecurityBaselineMicrosoftEdge + * Deprecate property `authschemes` and replace with `AuthSchemes_AuthSchemes` * M365DSCDRGUtil * Restrict CIM instance access to properties that appear multiple times. * Switch log type for not found Intune assignments to `Warning`. +* M365DSCIntuneSettingsCatalogUtil + * Add ADMX handling for `edge~httpauthentication_`. + FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (2/2) * DEPENDENCIES * Updated DSCParser to version 2.0.0.12. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.psm1 index 9a6140387a..b9fc29e2af 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.psm1 @@ -24,7 +24,7 @@ function Get-TargetResource [Parameter()] [System.Int32] [ValidateRange(7, 365)] - $PasswordAgeDays_AAD, + $passwordagedays_aad, [Parameter()] [System.Int32] @@ -118,7 +118,7 @@ function Get-TargetResource -ErrorAction Stop #Ensure the proper dependencies are installed in the current environment. - Confirm-M365DSCDependencies + #Confirm-M365DSCDependencies #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', '' @@ -237,7 +237,7 @@ function Set-TargetResource [Parameter()] [System.Int32] [ValidateRange(7, 365)] - $PasswordAgeDays_AAD, + $passwordagedays_aad, [Parameter()] [System.Int32] @@ -324,7 +324,7 @@ function Set-TargetResource ) #Ensure the proper dependencies are installed in the current environment. - Confirm-M365DSCDependencies + #Confirm-M365DSCDependencies #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', '' @@ -433,7 +433,7 @@ function Test-TargetResource [Parameter()] [System.Int32] [ValidateRange(7, 365)] - $PasswordAgeDays_AAD, + $passwordagedays_aad, [Parameter()] [System.Int32] diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.schema.mof index 33aeb469d7..a3eb529bec 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.schema.mof @@ -17,7 +17,7 @@ class MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy : OMI [Write, Description("Description of the account protection local administrator password solution policy.")] String Description; [Write, Description("Assignments of the account protection local administrator password solution policy."), EmbeddedInstance("MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicyAssignments")] String Assignments[]; [Write, Description("Configures which directory the local admin account password is backed up to. 0 - Disabled, 1 - Azure AD, 2 - AD"), ValueMap{"0", "1", "2"}, Values{"0", "1", "2"}] UInt32 BackupDirectory; - [Write, Description("Configures the maximum password age of the managed local administrator account for Azure AD. Minimum - 7, Maximum - 365")] UInt32 PasswordAgeDays_AAD; + [Write, Description("Configures the maximum password age of the managed local administrator account for Azure AD. Minimum - 7, Maximum - 365")] UInt32 passwordagedays_aad; [Write, Description("Configures the maximum password age of the managed local administrator account for Active Directory. Minimum - 1, Maximum - 365")] UInt32 PasswordAgeDays; [Write, Description("Configures additional enforcement of maximum password age for the managed local administrator account.")] Boolean PasswordExpirationProtectionEnabled; [Write, Description("Configures how many previous encrypted passwords will be remembered in Active Directory. Minimum - 0, Maximum - 12")] UInt32 AdEncryptedPasswordHistorySize; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.psm1 index c3b6e71fd2..35d258852e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.psm1 @@ -80,6 +80,10 @@ function Get-TargetResource [System.String] $authschemes, + [Parameter()] + [System.String] + $AuthSchemes_AuthSchemes, + [Parameter()] [ValidateSet('0', '1')] [System.String] @@ -338,6 +342,10 @@ function Set-TargetResource [System.String] $authschemes, + [Parameter()] + [System.String] + $AuthSchemes_AuthSchemes, + [Parameter()] [ValidateSet('0', '1')] [System.String] @@ -441,6 +449,13 @@ function Set-TargetResource $platforms = 'windows10' $technologies = 'mdm' + if ($BoundParameters.ContainsKey('authschemes')) + { + Write-Warning -Message "The parameter 'authschemes' is deprecated. Please use 'AuthSchemes_AuthSchemes' instead." + $BoundParameters['AuthSchemes_AuthSchemes'] = $BoundParameters['authschemes'] + $BoundParameters.Remove('authschemes') | Out-Null + } + if ($Ensure -eq 'Present' -and $currentInstance.Ensure -eq 'Absent') { Write-Verbose -Message "Creating an Intune Security Baseline Microsoft Edge with Name {$DisplayName}" @@ -589,6 +604,10 @@ function Test-TargetResource [System.String] $authschemes, + [Parameter()] + [System.String] + $AuthSchemes_AuthSchemes, + [Parameter()] [ValidateSet('0', '1')] [System.String] @@ -730,6 +749,17 @@ function Test-TargetResource } } + if ($PSBoundParameters.ContainsKey('authschemes')) + { + Write-Warning -Message "The parameter 'authschemes' is deprecated. Please use 'AuthSchemes_AuthSchemes' instead." + if ($PSBoundParameters['authschemes'] -ne $CurrentValues['AuthSchemes_AuthSchemes']) + { + $testResult = $false + } + $ValuesToCheck.Remove('authschemes') | Out-Null + $ValuesToCheck.Remove('AuthSchemes_AuthSchemes') | Out-Null + } + $ValuesToCheck.Remove('Id') | Out-Null $ValuesToCheck = Remove-M365DSCAuthenticationParameter -BoundParameters $ValuesToCheck diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.schema.mof index 8a9515e3d3..d8a2607bcb 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSecurityBaselineMicrosoftEdge/MSFT_IntuneSecurityBaselineMicrosoftEdge.schema.mof @@ -28,7 +28,8 @@ class MSFT_IntuneSecurityBaselineMicrosoftEdge : OMI_BaseResource [Write, Description("Force WebSQL to be enabled (0: Disabled, 1: Enabled)"), ValueMap{"0", "1"}, Values{"0", "1"}] String WebSQLAccess; [Write, Description("Allow Basic authentication for HTTP (0: Disabled, 1: Enabled)"), ValueMap{"0", "1"}, Values{"0", "1"}] String BasicAuthOverHttpEnabled; [Write, Description("Supported authentication schemes (0: Disabled, 1: Enabled)"), ValueMap{"0", "1"}, Values{"0", "1"}] String MicrosoftEdge_HTTPAuthentication_AuthSchemes; - [Write, Description("Supported authentication schemes (Device) - Depends on MicrosoftEdge_HTTPAuthentication_AuthSchemes")] String authschemes; + [Write, Description("(Deprecated) - Supported authentication schemes (Device) - Depends on MicrosoftEdge_HTTPAuthentication_AuthSchemes")] String authschemes; + [Write, Description("Supported authentication schemes (Device) - Depends on MicrosoftEdge_HTTPAuthentication_AuthSchemes")] String AuthSchemes_AuthSchemes; [Write, Description("Allow user-level native messaging hosts (installed without admin permissions) (0: Disabled, 1: Enabled)"), ValueMap{"0", "1"}, Values{"0", "1"}] String NativeMessagingUserLevelHosts; [Write, Description("Specifies whether to allow insecure websites to make requests to more-private network endpoints (0: Disabled, 1: Enabled)"), ValueMap{"0", "1"}, Values{"0", "1"}] String InsecurePrivateNetworkRequestsAllowed; [Write, Description("Show the Reload in Internet Explorer mode button in the toolbar (0: Disabled, 1: Enabled)"), ValueMap{"0", "1"}, Values{"0", "1"}] String InternetExplorerModeToolbarButtonEnabled; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/1-Create.ps1 index 0e1d844cfc..6018fdbd85 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/1-Create.ps1 @@ -34,7 +34,7 @@ Configuration Example } ); BackupDirectory = "1"; - PasswordAgeDays_AAD = 10; + passwordagedays_aad = 10; AdministratorAccountName = "Administrator"; PasswordAgeDays = 20; ApplicationId = $ApplicationId; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/2-Update.ps1 index 08d2c88584..c67e11eee7 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy/2-Update.ps1 @@ -34,7 +34,7 @@ Configuration Example } ); BackupDirectory = "1"; - PasswordAgeDays_AAD = 15; # Updated Property + passwordagedays_aad = 15; # Updated Property AdministratorAccountName = "Administrator"; PasswordAgeDays = 20; ApplicationId = $ApplicationId; diff --git a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 index 1fa5f90e54..9e9392dc88 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 @@ -2480,7 +2480,7 @@ function Update-IntuneDeviceConfigurationPolicy 'settings' = $Settings } $body = $policy | ConvertTo-Json -Depth 20 - Write-Verbose -Message $body -Verbose + # Write-Verbose -Message $body -Verbose Invoke-MgGraphRequest -Method PUT -Uri $Uri -Body $body -ErrorAction Stop } catch diff --git a/Modules/Microsoft365DSC/Modules/M365DSCIntuneSettingsCatalogUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCIntuneSettingsCatalogUtil.psm1 index 2888ff7ad7..465189fd7a 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCIntuneSettingsCatalogUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCIntuneSettingsCatalogUtil.psm1 @@ -67,7 +67,7 @@ } # When there is no parent, we can't use the parent setting name to make the setting name unique - # Instead, we traverse up the OffsetUri. + # Instead, we traverse up the OffsetUri. if ($null -eq $parentSetting) { $settingResult = Get-UniqueSettingDefinitionNameFromMultipleMatches -SettingDefinition $SettingDefinition -SettingName $settingName -SettingsWithSameName $settingsWithSameName @@ -98,6 +98,7 @@ 'pub16v2~Policy~L_MicrosoftOfficePublisher~*' { $settingName = $settingName.Replace('pub16v2~Policy~L_MicrosoftOfficePublisher', 'MicrosoftPublisherV2_') } 'pub16v3~Policy~L_MicrosoftOfficePublisher~*' { $settingName = $settingName.Replace('pub16v3~Policy~L_MicrosoftOfficePublisher', 'MicrosoftPublisherV3_') } 'microsoft_edge~Policy~microsoft_edge~*' { $settingName = $settingName.Replace('microsoft_edge~Policy~microsoft_edge', 'MicrosoftEdge_') } + 'edge~httpauthentication*' { $settingName = $settingName.Replace('edge~httpauthentication', 'MicrosoftEdge_HTTPAuthentication') } '*~L_Security~*' { $settingName = $settingName.Replace('~L_Security', 'Security') } '*~L_TrustCenter*' { $settingName = $settingName.Replace('~L_TrustCenter', '_TrustCenter') } '*~L_ProtectedView_*' { $settingName = $settingName.Replace('~L_ProtectedView', 'ProtectedView') } From cb7fba5b724ae36a6efa8c456ff26e0d1c658f5e Mon Sep 17 00:00:00 2001 From: NikCharlebois Date: Tue, 12 Nov 2024 13:34:24 +0000 Subject: [PATCH 2/6] Updated Resources and Cmdlet documentation pages --- ...untProtectionLocalAdministratorPasswordSolutionPolicy.md | 6 +++--- .../resources/intune/IntuneSecurityBaselineMicrosoftEdge.md | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/docs/resources/intune/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.md b/docs/docs/resources/intune/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.md index 7f39e3c94a..432220a768 100644 --- a/docs/docs/resources/intune/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.md +++ b/docs/docs/resources/intune/IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy.md @@ -9,7 +9,7 @@ | **Description** | Write | String | Description of the account protection local administrator password solution policy. | | | **Assignments** | Write | MSFT_IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicyAssignments[] | Assignments of the account protection local administrator password solution policy. | | | **BackupDirectory** | Write | UInt32 | Configures which directory the local admin account password is backed up to. 0 - Disabled, 1 - Azure AD, 2 - AD | `0`, `1`, `2` | -| **PasswordAgeDays_AAD** | Write | UInt32 | Configures the maximum password age of the managed local administrator account for Azure AD. Minimum - 7, Maximum - 365 | | +| **passwordagedays_aad** | Write | UInt32 | Configures the maximum password age of the managed local administrator account for Azure AD. Minimum - 7, Maximum - 365 | | | **PasswordAgeDays** | Write | UInt32 | Configures the maximum password age of the managed local administrator account for Active Directory. Minimum - 1, Maximum - 365 | | | **PasswordExpirationProtectionEnabled** | Write | Boolean | Configures additional enforcement of maximum password age for the managed local administrator account. | | | **AdEncryptedPasswordHistorySize** | Write | UInt32 | Configures how many previous encrypted passwords will be remembered in Active Directory. Minimum - 0, Maximum - 12 | | @@ -112,7 +112,7 @@ Configuration Example } ); BackupDirectory = "1"; - PasswordAgeDays_AAD = 10; + passwordagedays_aad = 10; AdministratorAccountName = "Administrator"; PasswordAgeDays = 20; ApplicationId = $ApplicationId; @@ -160,7 +160,7 @@ Configuration Example } ); BackupDirectory = "1"; - PasswordAgeDays_AAD = 15; # Updated Property + passwordagedays_aad = 15; # Updated Property AdministratorAccountName = "Administrator"; PasswordAgeDays = 20; ApplicationId = $ApplicationId; diff --git a/docs/docs/resources/intune/IntuneSecurityBaselineMicrosoftEdge.md b/docs/docs/resources/intune/IntuneSecurityBaselineMicrosoftEdge.md index 858d62840b..b841315513 100644 --- a/docs/docs/resources/intune/IntuneSecurityBaselineMicrosoftEdge.md +++ b/docs/docs/resources/intune/IntuneSecurityBaselineMicrosoftEdge.md @@ -19,7 +19,8 @@ | **WebSQLAccess** | Write | String | Force WebSQL to be enabled (0: Disabled, 1: Enabled) | `0`, `1` | | **BasicAuthOverHttpEnabled** | Write | String | Allow Basic authentication for HTTP (0: Disabled, 1: Enabled) | `0`, `1` | | **MicrosoftEdge_HTTPAuthentication_AuthSchemes** | Write | String | Supported authentication schemes (0: Disabled, 1: Enabled) | `0`, `1` | -| **authschemes** | Write | String | Supported authentication schemes (Device) - Depends on MicrosoftEdge_HTTPAuthentication_AuthSchemes | | +| **authschemes** | Write | String | (Deprecated) - Supported authentication schemes (Device) - Depends on MicrosoftEdge_HTTPAuthentication_AuthSchemes | | +| **AuthSchemes_AuthSchemes** | Write | String | Supported authentication schemes (Device) - Depends on MicrosoftEdge_HTTPAuthentication_AuthSchemes | | | **NativeMessagingUserLevelHosts** | Write | String | Allow user-level native messaging hosts (installed without admin permissions) (0: Disabled, 1: Enabled) | `0`, `1` | | **InsecurePrivateNetworkRequestsAllowed** | Write | String | Specifies whether to allow insecure websites to make requests to more-private network endpoints (0: Disabled, 1: Enabled) | `0`, `1` | | **InternetExplorerModeToolbarButtonEnabled** | Write | String | Show the Reload in Internet Explorer mode button in the toolbar (0: Disabled, 1: Enabled) | `0`, `1` | From d61b8fc75108803cd684022533f67421b6ab8fed Mon Sep 17 00:00:00 2001 From: NikCharlebois Date: Tue, 12 Nov 2024 13:36:37 +0000 Subject: [PATCH 3/6] Updated Schema Definition --- Modules/Microsoft365DSC/SchemaDefinition.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/Microsoft365DSC/SchemaDefinition.json b/Modules/Microsoft365DSC/SchemaDefinition.json index 81d5db4ea9..42d14171be 100644 --- a/Modules/Microsoft365DSC/SchemaDefinition.json +++ b/Modules/Microsoft365DSC/SchemaDefinition.json @@ -23790,7 +23790,7 @@ }, { "CIMType": "UInt32", - "Name": "PasswordAgeDays_AAD", + "Name": "passwordagedays_aad", "Option": "Write" }, { @@ -45443,6 +45443,11 @@ "Name": "authschemes", "Option": "Write" }, + { + "CIMType": "String", + "Name": "AuthSchemes_AuthSchemes", + "Option": "Write" + }, { "CIMType": "String", "Name": "NativeMessagingUserLevelHosts", From 2b03e072f83864e5dcb8e919aed1292288c6ec95 Mon Sep 17 00:00:00 2001 From: NikCharlebois Date: Tue, 12 Nov 2024 13:37:31 +0000 Subject: [PATCH 4/6] Updated {Create} Intune Integration Tests --- .../Microsoft365DSC/M365DSCIntegration.INTUNE.Create.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.INTUNE.Create.Tests.ps1 b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.INTUNE.Create.Tests.ps1 index 678e74b71c..a68b840aa5 100644 --- a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.INTUNE.Create.Tests.ps1 +++ b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.INTUNE.Create.Tests.ps1 @@ -46,7 +46,7 @@ } ); BackupDirectory = "1"; - PasswordAgeDays_AAD = 10; + passwordagedays_aad = 10; AdministratorAccountName = "Administrator"; PasswordAgeDays = 20; ApplicationId = $ApplicationId; From 7f69ca080fa0844420d4ab4341b996b7650879ca Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Tue, 12 Nov 2024 14:48:38 +0100 Subject: [PATCH 5/6] Updated dependencies to MSCloudLoginAssistant 1.1.28 --- CHANGELOG.md | 1 + Modules/Microsoft365DSC/Dependencies/Manifest.psd1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c5c7d350b..04fe1794a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (2/2) * DEPENDENCIES * Updated DSCParser to version 2.0.0.12. + * Updated MSCloudLoginAssistant to version 1.1.28. # 1.24.1106.3 diff --git a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 index 1e6255bee7..42d1488d67 100644 --- a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 +++ b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 @@ -122,7 +122,7 @@ }, @{ ModuleName = "MSCloudLoginAssistant" - RequiredVersion = "1.1.27" + RequiredVersion = "1.1.28" }, @{ ModuleName = 'PnP.PowerShell' From c7dcfc0246500653439fd3f4ba2c2857d0fc31ff Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 12 Nov 2024 09:01:06 -0500 Subject: [PATCH 6/6] TeamsUpgradePolicy - Performance Improvements --- CHANGELOG.md | 2 ++ .../MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c5c7d350b..e34ab75c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ * M365DSCIntuneSettingsCatalogUtil * Add ADMX handling for `edge~httpauthentication_`. FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (2/2) +* TeamsUpgradePolicy + * Changes to how we're retrieving the users to improve performance. * DEPENDENCIES * Updated DSCParser to version 2.0.0.12. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 index 20ecfd0716..e845b47cb9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 @@ -68,13 +68,13 @@ function Get-TargetResource if ($Identity -eq 'Global') { - [array]$users = Get-CsOnlineUser | Where-Object -Filter { $_.TeamsUpgradePolicy -eq $null } + [array]$users = Get-CsOnlineUser -Filter "TeamsUpgradePolicy eq null" } else { try { - [array]$users = Get-CsOnlineUser -Filter "TeamsUpgradePolicy -eq '$Identity'" + [array]$users = Get-CsOnlineUser -Filter "TeamsUpgradePolicy eq '$Identity'" } catch {