Skip to content

Commit

Permalink
Merge pull request #4801 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.24.626.1
  • Loading branch information
NikCharlebois authored Jun 26, 2024
2 parents b2ec61c + af0f6c4 commit e962d99
Show file tree
Hide file tree
Showing 117 changed files with 2,000 additions and 2,505 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Change log for Microsoft365DSC

# 1.24.626.1

* AADGroup
* FIXES [#4782](https://github.com/microsoft/Microsoft365DSC/issues/4782)
* IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy
* Migrate to new settings catalog cmdlets.
* IntuneDeviceManagementComplianceSettings
* Initial Release.
* IntuneDeviceRemediation
* Fix invalid assignment export and import.
FIXES [#4726](https://github.com/microsoft/Microsoft365DSC/issues/4726)
* M365DSCDRGUtil
* Fixes an issue with the settings catalog property generation.
* Add `collectionId` export to `ConvertFrom-IntunePolicyAssignment`
* Add handling for Intune assignments in `Compare-M365DSCComplexObject`
* Fix issue with target handling in `Update-DeviceConfigurationPolicyAssignment`
* M365DSCUtil
* Fixes an issue where the comparison with null-valued desired value throws an error.
* DEPENDENCIES
* Updated MSCloudLoginAssistant to version 1.1.18
* M365DSCResourceGenerator
* Update CimInstance comparison template
* MISC
* Add group display name export and update assignment comparison across Intune
resources.

# 1.24.619.1

* SCDLPComplianceRule
Expand All @@ -21,7 +47,7 @@
* TeamsMeetingPolicy
* Updated the allowed values for the TeamsCameraFarEndTPTXZmode property.
* M365DSCResourceGenerator
* Fix formatting and missing escape character in Resource Generator
* Fix formatting and missing escape character in Resource Generator.

# 1.24.605.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ function Set-TargetResource
$currentParameters.Remove('Owners') | Out-Null
$currentParameters.Remove('Members') | Out-Null
$currentParameters.Remove('MemberOf') | Out-Null
#$currentParameters.Remove('AssignedToRole') | Out-Null
$currentParameters.Remove('AssignedToRole') | Out-Null

if ($Ensure -eq 'Present' -and `
($null -ne $GroupTypes -and $GroupTypes.Contains('Unified')) -and `
Expand Down Expand Up @@ -533,7 +533,7 @@ function Set-TargetResource
if ($Ensure -eq 'Present' -and $currentGroup.Ensure -eq 'Absent')
{
Write-Verbose -Message "Checking to see if an existing deleted group exists with DisplayName {$DisplayName}"
$restorinExisting = $false
$restoringExisting = $false
[Array]$groups = Get-MgBetaDirectoryDeletedItemAsGroup -Filter "DisplayName eq '$DisplayName'"
if ($groups.Length -gt 1)
{
Expand Down Expand Up @@ -794,7 +794,7 @@ function Set-TargetResource
}
}

if ($currentGroup.IsAssignableToRole -eq $true -and $currentParameters.ContainsKey('AssignedToRole'))
if ($currentGroup.IsAssignableToRole -eq $true -and $PSBoundParameters.ContainsKey('AssignedToRole'))
{
#AssignedToRole
$currentAssignedToRoleValue = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,7 @@ function Set-TargetResource
$policy = New-MgBetaDeviceManagementIntent -BodyParameter $createParameters

#region Assignments
$assignmentsHash = @()
foreach ($assignment in $Assignments)
{
$assignmentsHash += Get-M365DSCDRGComplexTypeToHashtable -ComplexObject $Assignment
}
$assignmentsHash = ConvertTo-IntunePolicyAssignment -IncludeDeviceFilter:$true -Assignments $Assignments
if ($policy.id)
{
Update-DeviceConfigurationPolicyAssignment -DeviceConfigurationPolicyId $policy.id `
Expand Down Expand Up @@ -557,15 +553,10 @@ function Set-TargetResource
#Using Rest to reduce the number of calls
$Uri = "https://graph.microsoft.com/beta/deviceManagement/intents/$($currentPolicy.Identity)/updateSettings"
$body = @{'settings' = $settings }
Invoke-MgGraphRequest -Method POST -Uri $Uri -Body ($body | ConvertTo-Json -Depth 20) -ContentType 'application/json' 4> Out-Null
Invoke-MgGraphRequest -Method POST -Uri $Uri -Body ($body | ConvertTo-Json -Depth 20) -ContentType 'application/json' 4> $null

#region Assignments
$assignmentsHash = @()
foreach ($assignment in $Assignments)
{
$assignmentsHash += Get-M365DSCDRGComplexTypeToHashtable -ComplexObject $Assignment
}

$assignmentsHash = ConvertTo-IntunePolicyAssignment -IncludeDeviceFilter:$true -Assignments $Assignments
Update-DeviceConfigurationPolicyAssignment -DeviceConfigurationPolicyId $currentPolicy.Identity `
-Targets $assignmentsHash `
-Repository 'deviceManagement/intents'
Expand Down
Loading

0 comments on commit e962d99

Please sign in to comment.