From 996e75c9875ffb6e450cf6ccdf3182fa023ff6d4 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Thu, 16 Jul 2026 23:45:02 +0200 Subject: [PATCH] remove guard for retry --- Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 b/Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 index a085bf8c7bcbb..87737fd6d0927 100644 --- a/Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 +++ b/Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 @@ -21,18 +21,6 @@ function Set-CIPPCPVConsent { return @('Application is already consented to this tenant') } - # Skip the Partner Center POST if consent was applied recently and we're not resetting - if (-not $ResetSP) { - $CpvTable = Get-CIPPTable -TableName cpvtenants - $ExistingRow = Get-CIPPAzDataTableEntity @CpvTable -Filter "PartitionKey eq 'Tenant' and RowKey eq '$TenantFilter'" - if ($ExistingRow -and $ExistingRow.applicationId -eq $env:ApplicationID -and $ExistingRow.LastApply) { - $UnixNow = [int64](([datetime]::UtcNow) - (Get-Date '1/1/1970')).TotalSeconds - if (($UnixNow - [int64]$ExistingRow.LastApply) -lt 86400) { - return @("CPV consent for $TenantName is current, skipping re-consent") - } - } - } - if ($ResetSP) { try { if ($PSCmdlet.ShouldProcess($env:ApplicationID, "Delete Service Principal from $TenantName")) {