From 7cede9b87222e49beb856575552150004e6551d4 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 14 Nov 2023 12:47:28 -0800 Subject: [PATCH] Release 1.23.1108.2 --- CHANGELOG.md | 18 +++++--- ...SFT_AADRoleEligibilityScheduleRequest.psm1 | 40 ++++++++--------- Modules/Microsoft365DSC/Microsoft365DSC.psd1 | 44 ++++++++++++++----- 3 files changed, 65 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58044b324e..62d3aa0509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,13 @@ # Change log for Microsoft365DSC -# UNRELEASED +# 1.23.1108.2 -* IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 - * fix an issue where the firewall settings were not populate correctly - FIXES [#3851](https://github.com/microsoft/Microsoft365DSC/issues/3851) * AADRoleEligibilityScheduleRequest - * Fixed incorrect subclass MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrenceRange for range property + * Fixed incorrect subclass MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrenceRange + for range property FIXES [#3847](https://github.com/microsoft/Microsoft365DSC/issues/3847) + * Fixes issue where creating an entry that was previously removed threw an error + complaining that the role eligibility already existed. * IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy * Initial release FIXES [#3034](https://github.com/microsoft/Microsoft365DSC/issues/3034) 3/3 @@ -18,13 +18,17 @@ * Initial release FIXES [#3034](https://github.com/microsoft/Microsoft365DSC/issues/3034) 1/3 * IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10 - * fix typo in Get-TargetResource + * Fixes typo in Get-TargetResource FIXES [#3869](https://github.com/microsoft/Microsoft365DSC/issues/3869) +* IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 + * Fix an issue where the firewall settings were not populate correctly + FIXES [#3851](https://github.com/microsoft/Microsoft365DSC/issues/3851) * IntuneDeviceEnrollmentStatusPageWindows10 * Fix typo in the catch of Update-DeviceEnrollmentConfigurationPriority FIXES [#3442](https://github.com/microsoft/Microsoft365DSC/issues/3442) * M365DSCDRGUTIL - * Fix an issue where temporary parameters were not renamed during recursive call causing a Model Validation error during creation or update of a Graph resource + * Fix an issue where temporary parameters were not renamed during recursive call causing a Model Validation + error during creation or update of a Graph resource FIXES [#3582](https://github.com/microsoft/Microsoft365DSC/issues/3582) * MISC * Added a QA check to test if all used subclasses actually exist in the MOF schema. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 index 2e4b3c31ac..bc1b1f37e8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 @@ -110,17 +110,17 @@ { if ($null -ne $Script:exportedInstances -and $Script:ExportMode) { - $request = $Script:exportedInstances | Where-Object -FilterScript {$_.Id -eq $Id} + [Array]$request = $Script:exportedInstances | Where-Object -FilterScript {$_.Id -eq $Id} } else { Write-Verbose -Message "Getting Role Eligibility by Id {$Id}" - $request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -UnifiedRoleEligibilityScheduleRequestId $Id ` + [Array]$request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -UnifiedRoleEligibilityScheduleRequestId $Id ` -ErrorAction SilentlyContinue } } - if ($null -eq $request) + if ($null -eq $request -or $request.Length -eq 0) { if ($null -ne $Script:exportedInstances -and $Script:ExportMode) { @@ -146,7 +146,7 @@ } Write-Verbose -Message "Found Principal {$PrincipalId}" $RoleDefinitionId = (Get-MgBetaRoleManagementDirectoryRoleDefinition -Filter "DisplayName eq '$RoleDefinition'").Id - $request = $Script:exportedInstances | Where-Object -FilterScript {$_.PrincipalId -eq $PrincipalId -and $_.RoleDefinitionId -eq $RoleDefinition} + [Array]$request = $Script:exportedInstances | Where-Object -FilterScript {$_.PrincipalId -eq $PrincipalId -and $_.RoleDefinitionId -eq $RoleDefinition} } else { @@ -178,15 +178,15 @@ Write-Verbose -Message "Found Role {$RoleDefinitionId}" $schedule = Get-MgBetaRoleManagementDirectoryRoleEligibilitySchedule -Filter "PrincipalId eq '$PrincipalId' and RoleDefinitionId eq '$RoleDefinitionId'" - $request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -Filter "PrincipalId eq '$PrincipalId' and RoleDefinitionId eq '$RoleDefinitionId'" + [Array]$request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -Filter "PrincipalId eq '$PrincipalId' and RoleDefinitionId eq '$RoleDefinitionId'" } } else { $RoleDefinitionId = (Get-MgBetaRoleManagementDirectoryRoleDefinition -Filter "DisplayName eq '$RoleDefinition'").Id - $schedule = Get-MgBetaRoleManagementDirectoryRoleEligibilitySchedule -Filter "PrincipalId eq '$($request.PrincipalId)' and RoleDefinitionId eq '$RoleDefinitionId'" + $schedule = Get-MgBetaRoleManagementDirectoryRoleEligibilitySchedule -Filter "PrincipalId eq '$($request[0].PrincipalId)' and RoleDefinitionId eq '$RoleDefinitionId'" } - if ($null -eq $schedule -or $null -eq $request) + if ($null -eq $schedule -or $null -eq $request -or $request.Length -eq 0) { return $nullResult } @@ -194,12 +194,12 @@ Write-Verbose -Message "Found existing AADRolelLigibilityScheduleRequest" if ($PrincipalType -eq 'User') { - $PrincipalInstance = Get-MgUser -UserId $request.PrincipalId -ErrorAction SilentlyContinue + $PrincipalInstance = Get-MgUser -UserId $request[0].PrincipalId -ErrorAction SilentlyContinue $PrincipalTypeValue = 'User' } if ($null -eq $PrincipalInstance -or $PrincipalType -eq 'Group') { - $PrincipalInstance = Get-MGGroup -GroupId $request.PrincipalId -ErrorAction SilentlyContinue + $PrincipalInstance = Get-MGGroup -GroupId $request[0].PrincipalId -ErrorAction SilentlyContinue $PrincipalTypeValue = 'Group' } @@ -250,11 +250,11 @@ } $ticketInfoValue = $null - if ($null -ne $request.TicketInfo) + if ($null -ne $request[0].TicketInfo) { $ticketInfoValue = @{ - ticketNumber = $request.TicketInfo.TicketNumber - ticketSystem = $request.TicketInfo.TicketSystem + ticketNumber = $request[0].TicketInfo.TicketNumber + ticketSystem = $request[0].TicketInfo.TicketSystem } } @@ -272,12 +272,12 @@ Principal = $PrincipalValue PrincipalType = $PrincipalTypeValue RoleDefinition = $RoleDefinition - DirectoryScopeId = $request.DirectoryScopeId - AppScopeId = $request.AppScopeId - Action = $request.Action - Id = $request.Id - Justification = $request.Justification - IsValidationOnly = $request.IsValidationOnly + DirectoryScopeId = $request[0].DirectoryScopeId + AppScopeId = $request[0].AppScopeId + Action = $request[0].Action + Id = $request[0].Id + Justification = $request[0].Justification + IsValidationOnly = $request[0].IsValidationOnly ScheduleInfo = $ScheduleInfoValue TicketInfo = $ticketInfoValue Ensure = 'Present' @@ -737,7 +737,7 @@ function Export-TargetResource [array] $allRequests = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -All ` -Filter "Status ne 'Revoked'" -ErrorAction Stop foreach ($schedule in $schedules) - { + { [array] $Script:exportedInstances += $allRequests | Where-Object -FilterScript {$_.TargetScheduleId -eq $schedule.Id} } #endregion @@ -756,7 +756,7 @@ function Export-TargetResource { $displayedKey = $request.Id Write-Host " |---[$i/$($Script:exportedInstances.Count)] $displayedKey" -NoNewline - + $RoleDefinitionId = Get-MgBetaRoleManagementDirectoryRoleDefinition -UnifiedRoleDefinitionId $request.RoleDefinitionId $params = @{ Id = $request.Id diff --git a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 index 9bd50c5aba..ef2770db41 100644 --- a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 +++ b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 2023-11-08 +# Generated on: 2023-11-14 @{ @@ -11,7 +11,7 @@ # RootModule = '' # Version number of this module. - ModuleVersion = '1.23.1108.1' + ModuleVersion = '1.23.1108.2' # Supported PSEditions # CompatiblePSEditions = @() @@ -140,14 +140,38 @@ IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true' # ReleaseNotes of this module - ReleaseNotes = '* AADExternalIdentityPolicy - * Initial release. - * O365OrgSettings - * Force register the Office on the Web ServicePrincipal is it is not present. - FIXES [#3842](https://github.com/microsoft/Microsoft365DSC/issues/3842) - * TeamsTeam - * Fixes incomplete import due to error "Cannot index into a null array" - FIXES: [#3759](https://github.com/microsoft/Microsoft365DSC/issues/3759)' + ReleaseNotes = '* AADRoleEligibilityScheduleRequest + * Fixed incorrect subclass MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrenceRange + for range property + FIXES [#3847](https://github.com/microsoft/Microsoft365DSC/issues/3847) + * Fixes issue where creating an entry that was previously removed threw an error + complaining that the role eligibility already existed. + * IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy + * Initial release + FIXES [#3034](https://github.com/microsoft/Microsoft365DSC/issues/3034) 3/3 + * IntuneAccountProtectionLocalUserGroupMembershipPolicy + * Initial release + FIXES [#3034](https://github.com/microsoft/Microsoft365DSC/issues/3034) 2/3 + * IntuneAccountProtectionPolicy + * Initial release + FIXES [#3034](https://github.com/microsoft/Microsoft365DSC/issues/3034) 1/3 + * IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10 + * Fixes typo in Get-TargetResource + FIXES [#3869](https://github.com/microsoft/Microsoft365DSC/issues/3869) + * IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 + * Fix an issue where the firewall settings were not populate correctly + FIXES [#3851](https://github.com/microsoft/Microsoft365DSC/issues/3851) + * IntuneDeviceEnrollmentStatusPageWindows10 + * Fix typo in the catch of Update-DeviceEnrollmentConfigurationPriority + FIXES [#3442](https://github.com/microsoft/Microsoft365DSC/issues/3442) + * M365DSCDRGUTIL + * Fix an issue where temporary parameters were not renamed during recursive call causing a Model Validation + error during creation or update of a Graph resource + FIXES [#3582](https://github.com/microsoft/Microsoft365DSC/issues/3582) + * MISC + * Added a QA check to test if all used subclasses actually exist in the MOF schema. + * DEPENDENCIES + * Updated Microsoft. Graph dependencies to version 2.9.0.' # Flag to indicate whether the module requires explicit user acceptance for install/update # RequireLicenseAcceptance = $false