Skip to content

Commit 6b81c0a

Browse files
committed
change table query call
1 parent 5c013e0 commit 6b81c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/CIPPCore/Public/Webhooks/Test-CIPPAuditLogRules.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ function Test-CIPPAuditLogRules {
103103
$Data.clientip = $Data.clientip -replace $IPRegex, '$1' -replace '[\[\]]', ''
104104

105105
# Check if IP is on trusted IP list
106-
$TrustedIP = Get-CIPPAzDataTableEntity @TrustedIPTable -Filter "((PartitionKey eq '$TenantFilter') or (PartitionKey eq 'AllTenants')) and RowKey eq '$($Data.clientip)' and state eq 'Trusted'"
106+
$TrustedIP = Get-CIPPAzDataTableEntity @TrustedIPTable -Filter "((PartitionKey eq '$TenantFilter') or (PartitionKey eq 'AllTenants')) and RowKey eq '$($Data.clientip)' and state eq 'Trusted'"
107107
if ($TrustedIP) {
108108
#write-warning "IP $($Data.clientip) is trusted"
109109
$Trusted = $true
110110
}
111111
if (!$Trusted) {
112112
$CacheLookupStartTime = Get-Date
113-
$Location = Get-CIPPAzDataTableEntity @LocationTable -Filter "RowKey eq '$($Data.clientIp)'" | Select-Object -Last 1 -ExcludeProperty Tenant
113+
$Location = Get-AzDataTableEntity @LocationTable -Filter "RowKey eq '$($Data.clientIp)'" | Select-Object -ExcludeProperty Tenant
114114
$CacheLookupEndTime = Get-Date
115115
$CacheLookupSeconds = ($CacheLookupEndTime - $CacheLookupStartTime).TotalSeconds
116116
Write-Warning "Cache lookup for IP $($Data.clientip) took $CacheLookupSeconds seconds"

0 commit comments

Comments
 (0)