Skip to content

Commit

Permalink
Merge pull request #3896 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.23.1108.2
  • Loading branch information
NikCharlebois authored Nov 14, 2023
2 parents 9012779 + 92203ab commit 7840ef9
Show file tree
Hide file tree
Showing 35 changed files with 5,036 additions and 85 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Change log for Microsoft365DSC

# 1.23.1108.2

* 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.

# 1.23.1108.1

* AADExternalIdentityPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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
{
Expand Down Expand Up @@ -178,28 +178,28 @@
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
}

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'
}

Expand Down Expand Up @@ -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
}
}

Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ClassVersion("1.0.0")]
class MSFT_AADRoleEligibilityScheduleRequestScheduleRange
class MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrenceRange
{
[Required, Description("The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date.")] String endDate;
[Write, Description("The number of times to repeat the event. Required and must be positive if type is numbered.")] UInt32 numberOfOccurrences;
Expand Down
Loading

0 comments on commit 7840ef9

Please sign in to comment.