Skip to content

Commit

Permalink
Merge pull request #5371 from FabienTschanz/feat/intune-warning-assig…
Browse files Browse the repository at this point in the history
…nments

Switch log type to Warning for not found Intune assignments
  • Loading branch information
NikCharlebois authored Nov 11, 2024
2 parents a6986dc + 7d2badc commit 8663652
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Fixes [#5373](https://github.com/microsoft/Microsoft365DSC/issues/5373)
* M365DSCDRGUtil
* Restrict CIM instance access to properties that appear multiple times.
* Switch log type for not found Intune assignments to `Warning`.

# 1.24.1106.3

Expand All @@ -27,7 +28,6 @@
* MISC
* Fixed issues with API Url's parsing.


# 1.24.1106.1

* AADAccessReviewDefinition
Expand Down
24 changes: 12 additions & 12 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -992,14 +992,14 @@ function ConvertTo-IntunePolicyAssignment
{
$message = "Skipping assignment for the group with DisplayName {$($assignment.groupDisplayName)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or groupDisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
if ($group -and $group.Count -gt 1)
{
$message = "Skipping assignment for the group with DisplayName {$($assignment.groupDisplayName)} as it is not unique in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$group = $null
$target = $null
}
Expand All @@ -1008,7 +1008,7 @@ function ConvertTo-IntunePolicyAssignment
{
$message = "Skipping assignment for the group with Id {$($assignment.groupId)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
}
Expand Down Expand Up @@ -1165,14 +1165,14 @@ function ConvertTo-IntuneMobileAppAssignment
{
$message = "Skipping assignment for the group with DisplayName {$($assignment.groupDisplayName)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or groupDisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
if ($group -and $group.Count -gt 1)
{
$message = "Skipping assignment for the group with DisplayName {$($assignment.groupDisplayName)} as it is not unique in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$group = $null
$target = $null
}
Expand All @@ -1181,7 +1181,7 @@ function ConvertTo-IntuneMobileAppAssignment
{
$message = "Skipping assignment for the group with Id {$($assignment.groupId)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
}
Expand Down Expand Up @@ -1329,14 +1329,14 @@ function Update-DeviceConfigurationPolicyAssignment
{
$message = "Skipping assignment for the group with DisplayName {$($target.groupDisplayName)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or groupDisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
if ($group -and $group.count -gt 1)
{
$message = "Skipping assignment for the group with DisplayName {$($target.groupDisplayName)} as it is not unique in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$group = $null
$target = $null
}
Expand All @@ -1345,7 +1345,7 @@ function Update-DeviceConfigurationPolicyAssignment
{
$message = "Skipping assignment for the group with Id {$($target.groupId)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
}
Expand Down Expand Up @@ -1452,14 +1452,14 @@ function Update-DeviceAppManagementPolicyAssignment
{
$message = "Skipping assignment for the group with DisplayName {$($target.groupDisplayName)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or groupDisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
if ($group -and $group.count -gt 1)
{
$message = "Skipping assignment for the group with DisplayName {$($target.groupDisplayName)} as it is not unique in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$group = $null
$target = $null
}
Expand All @@ -1468,7 +1468,7 @@ function Update-DeviceAppManagementPolicyAssignment
{
$message = "Skipping assignment for the group with Id {$($target.groupId)} as it could not be found in the directory.`r`n"
$message += "Please update your DSC resource extract with the correct groupId or a unique group DisplayName."
Write-Verbose -Message $message
Write-Warning -Message $message
$target = $null
}
}
Expand Down

0 comments on commit 8663652

Please sign in to comment.