Skip to content

Commit 3e43e65

Browse files
committed
iterate through tenant domain results
1 parent babfffb commit 3e43e65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/CippExtensions/Public/HIBP/New-BreachTenantSearch.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ function New-BreachTenantSearch {
66
)
77

88
$Table = Get-CIPPTable -TableName UserBreaches
9-
$LatestBreach = Get-BreachInfo -TenantFilter $TenantFilter | Where-Object { $_.email } | Group-Object -Property clientDomain
9+
$LatestBreach = Get-BreachInfo -TenantFilter $TenantFilter | ForEach-Object {
10+
$_ | Where-Object { $_ -and $_.email }
11+
} | Group-Object -Property clientDomain
1012

1113
$usersResults = foreach ($domain in $LatestBreach) {
1214
$ExistingBreaches = Get-CIPPAzDataTableEntity @Table -Filter "RowKey eq '$($domain.name)'"

0 commit comments

Comments
 (0)