Skip to content

Commit

Permalink
resources for removal
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Dec 29, 2023
1 parent a656d90 commit 74cb6e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Modules/CIPPCore/Public/Invoke-RemoveWebhookAlert.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Function Invoke-RemoveWebhookAlert {
RowKey = 'AllTenantsWebhookCreation'
PartitionKey = 'webhookcreation'
}
RemoveAzDataTableEntity @Table -Entity $CompleteObject -ErrorAction SilentlyContinue | Out-Null
Remove-AzDataTableEntity @Table -Entity $CompleteObject -ErrorAction SilentlyContinue | Out-Null

} else {
$Tenants = $Request.query.TenantFilter
Expand Down
2 changes: 1 addition & 1 deletion Modules/CIPPCore/Public/Remove-CIPPGraphSubscription.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Remove-CIPPGraphSubscription {
$WebhookTable = Get-CIPPTable -TableName webhookTable
$WebhookRow = Get-CIPPAzDataTableEntity @WebhookTable | Where-Object { $_.RowKey -eq $CIPPID }
$Entity = $WebhookRow | Select-Object PartitionKey, RowKey
if ($WebhookRow.Resource -eq 'M365AuditLogsv2') {
if ($WebhookRow.Resource -in @('Audit.AzureActiveDirectory', 'Audit.Exchange', 'Audit.SharePoint', 'Audit.General')) {
try {
$AuditLog = New-GraphPOSTRequest -uri "https://manage.office.com/api/v1.0/$($TenantFilter)/activity/feed/subscriptions/stop?contentType=$($WebhookRow.EventType)" -scope 'https://manage.office.com/.default' -tenantid $TenantFilter -type POST -body '{}' -verbose
} catch {
Expand Down

0 comments on commit 74cb6e2

Please sign in to comment.