diff --git a/Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 b/Modules/CIPPCore/Public/Set-CIPPCPVConsent.ps1 index a085bf8c7bcb..87737fd6d092 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")) {