Skip to content

Commit 6921c77

Browse files
committed
Reset graph error count on successful query
1 parent 3492c3d commit 6921c77

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/CIPPCore/Public/GraphHelper/New-GraphGetRequest.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function New-GraphGetRequest {
8888
}
8989
} until ([string]::IsNullOrEmpty($NextURL) -or $NextURL -is [object[]] -or ' ' -eq $NextURL)
9090
$Tenant.LastGraphError = ''
91+
$Tenant.GraphErrorCount = 0
9192
Update-AzDataTableEntity @TenantsTable -Entity $Tenant
9293
return $ReturnedData
9394
} else {

Modules/CippExtensions/Public/NinjaOne/Invoke-NinjaOneTenantSync.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function Invoke-NinjaOneTenantSync {
4242
$CIPPUrl = ($NinjaSettings | Where-Object { $_.RowKey -eq 'CIPPURL' }).SettingValue
4343

4444

45-
$Customer = Get-Tenants | Where-Object { $_.customerId -eq $MappedTenant.RowKey }
45+
$Customer = Get-Tenants -IncludeErrors | Where-Object { $_.customerId -eq $MappedTenant.RowKey }
4646
Write-Host "Processing: $($Customer.displayName) - Queued for $((New-TimeSpan -Start $StartQueueTime -End $StartTime).TotalSeconds)"
4747

4848
Write-LogMessage -API 'NinjaOneSync' -user 'NinjaOneSync' -message "Processing NinjaOne Synchronization for $($Customer.displayName) - Queued for $((New-TimeSpan -Start $StartQueueTime -End $StartTime).TotalSeconds)" -Sev 'Info'

0 commit comments

Comments
 (0)