Skip to content

Commit

Permalink
Merge pull request microsoft#3391 from NikCharlebois/Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois authored Jun 16, 2023
2 parents 83b4b44 + 053ecf0 commit 4a27ecc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log for Microsoft365DSC

# UNRELEASED

* SCProtectionAlert
* Prevents extracting system rules.
FIXES [#3224](https://github.com/microsoft/Microsoft365DSC/issues/3224)

# 1.23.614.1

* AADApplication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,14 @@ function Convert-CIMToAdvancedSettings
if ($obj.Value -ne 'None')
{
$label = Get-Label | Where-Object -FilterScript { $_.DisplayName -eq $obj.Value }
$settingsValues = $label.ImmutableId.ToString()
if ($null -eq $label)
{
Write-Error -Message "Label {$($obj.value)} doesn't exist. Please define the Sensitivy label first before trying to assign it to a policy."
}
else
{
$settingsValues = $label.ImmutableId.ToString()
}
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ function Export-TargetResource

try
{
[array]$Alerts = Get-ProtectionAlert -ErrorAction Stop
[array]$Alerts = Get-ProtectionAlert -ErrorAction Stop | Where-Object -FilterScript {-not $_.IsSystemRule}

$totalAlerts = $Alerts.Length
if ($null -eq $totalAlerts)
Expand Down

0 comments on commit 4a27ecc

Please sign in to comment.