Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#707 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Fix onboarding tenant cache clear
  • Loading branch information
JohnDuprey authored Mar 29, 2024
2 parents 9887237 + 83fdd85 commit 5aac6cd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ Function Push-ExecOnboardTenantQueue {
$Logs.Add([PSCustomObject]@{ Date = Get-Date -UFormat $DateFormat; Log = 'CPV permissions refreshed' })
$OnboardingSteps.Step4.Status = 'succeeded'
$OnboardingSteps.Step4.Message = 'CPV permissions refreshed'
if ($Tenant.defaultDomainName -match 'Domain Error') {
try {
Remove-CIPPCache -tenantsOnly $true
} catch {}
$Tenant = Get-Tenants -IncludeAll | Where-Object { $_.customerId -eq $Relationship.customer.tenantId } | Select-Object -First 1
}
} else {
$Logs.Add([PSCustomObject]@{ Date = Get-Date -UFormat $DateFormat; Log = 'CPV permissions failed to refresh' })
$TenantOnboarding.Status = 'failed'
Expand Down

0 comments on commit 5aac6cd

Please sign in to comment.