Skip to content

Commit 4798cda

Browse files
authored
Fix ActionUrl / CIPPURL being populated incorrectly
1 parent b100fe2 commit 4798cda

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Webhooks/Push-AuditLogTenant.ps1

+9-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ function Push-AuditLogTenant {
2626
}
2727
$CIPPURL = $LegacyUrl
2828
} else {
29-
$CIPPURL = 'https://{0}' -f $CippConfig.Value
29+
if (!$CippConfig) {
30+
$CippConfig = @{
31+
PartitionKey = 'InstanceProperties'
32+
RowKey = 'CIPPURL'
33+
Value = [string]([System.Uri]$Request.Headers.'x-ms-original-url').Host
34+
}
35+
Add-AzDataTableEntity @ConfigTable -Entity $CippConfig -Force
36+
$CIPPURL = 'https://{0}' -f $CippConfig.Value
37+
} else { $CIPPURL = 'https://{0}' -f $CippConfig.Value }
3038
}
3139

3240
# Get webhook rules

0 commit comments

Comments
 (0)