File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,18 +21,6 @@ function Set-CIPPCPVConsent {
2121 return @ (' Application is already consented to this tenant' )
2222 }
2323
24- # Skip the Partner Center POST if consent was applied recently and we're not resetting
25- if (-not $ResetSP ) {
26- $CpvTable = Get-CIPPTable - TableName cpvtenants
27- $ExistingRow = Get-CIPPAzDataTableEntity @CpvTable - Filter " PartitionKey eq 'Tenant' and RowKey eq '$TenantFilter '"
28- if ($ExistingRow -and $ExistingRow.applicationId -eq $env: ApplicationID -and $ExistingRow.LastApply ) {
29- $UnixNow = [int64 ](([datetime ]::UtcNow) - (Get-Date ' 1/1/1970' )).TotalSeconds
30- if (($UnixNow - [int64 ]$ExistingRow.LastApply ) -lt 86400 ) {
31- return @ (" CPV consent for $TenantName is current, skipping re-consent" )
32- }
33- }
34- }
35-
3624 if ($ResetSP ) {
3725 try {
3826 if ($PSCmdlet.ShouldProcess ($env: ApplicationID , " Delete Service Principal from $TenantName " )) {
You can’t perform that action at this time.
0 commit comments