Skip to content

Commit 42bdfb2

Browse files
Merge pull request KelvinTegelaar#1490 from Zacgoose/huntress-alert-fix
FIX: Corrected input value from alert configuration for Huntress alert
2 parents 4f17c81 + e0de70c commit 42bdfb2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Modules/CIPPCore/Public/Alerts/Get-CIPPAlertHuntressRogueApps.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,16 @@ function Get-CIPPAlertHuntressRogueApps {
1313
Param (
1414
[Parameter(Mandatory = $false)]
1515
[Alias('input')]
16-
$InputValue,
17-
$TenantFilter,
18-
[Parameter(Mandatory = $false)]
19-
[bool]$IgnoreDisabledApps = $false
16+
[bool]$InputValue = $false,
17+
$TenantFilter
2018
)
2119

2220
try {
2321
$RogueApps = Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/huntresslabs/rogueapps/main/public/rogueapps.json'
2422
$RogueAppFilter = $RogueApps.appId -join "','"
2523
$ServicePrincipals = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/servicePrincipals?`$filter=appId in ('$RogueAppFilter')" -tenantid $TenantFilter
2624
# If IgnoreDisabledApps is true, filter out disabled service principals
27-
if ($IgnoreDisabledApps) {
25+
if ($InputValue) {
2826
$ServicePrincipals = $ServicePrincipals | Where-Object { $_.accountEnabled -eq $true }
2927
}
3028

0 commit comments

Comments
 (0)