Skip to content

Commit cea969e

Browse files
authored
Merge pull request #602 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents cb6f1d6 + b805ce6 commit cea969e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ function New-GraphGetRequest {
165165
# Check for "Resource temporarily unavailable"
166166
elseif ($Message -like '*Resource temporarily unavailable*') {
167167
if ($RetryCount -lt $MaxRetries) {
168+
$WaitTime = Get-Random -Minimum 1.1 -Maximum 3.1 # Random sleep between 1-2 seconds
169+
Write-Warning "Resource temporarily unavailable. Waiting $WaitTime seconds before retry. Attempt $($RetryCount + 1) of $MaxRetries"
168170
$ShouldRetry = $true
169171
}
170172
}

Modules/CIPPCore/Public/Webhooks/Test-CIPPAuditLogRules.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ function Test-CIPPAuditLogRules {
204204
$LocationTable = Get-CIPPTable -TableName 'knownlocationdbv2'
205205
$ProcessedData = foreach ($AuditRecord in $SearchResults) {
206206
$RecordStartTime = Get-Date
207-
Write-Information "Processing RowKey $($AuditRecord.id)"
208-
$RootProperties = $AuditRecord | Select-Object * -ExcludeProperty auditData
209-
$Data = $AuditRecord.auditData | Select-Object *, CIPPAction, CIPPClause, CIPPGeoLocation, CIPPBadRepIP, CIPPHostedIP, CIPPIPDetected, CIPPLocationInfo, CIPPExtendedProperties, CIPPDeviceProperties, CIPPParameters, CIPPModifiedProperties, AuditRecord -ErrorAction SilentlyContinue
207+
Write-Information "Processing RowKey $($AuditRecord.id) - $($TenantFilter)."
208+
$RootProperties = $AuditRecord
209+
$Data = $AuditRecord | Select-Object *, CIPPAction, CIPPClause, CIPPGeoLocation, CIPPBadRepIP, CIPPHostedIP, CIPPIPDetected, CIPPLocationInfo, CIPPExtendedProperties, CIPPDeviceProperties, CIPPParameters, CIPPModifiedProperties, AuditRecord -ErrorAction SilentlyContinue
210210
try {
211211
# Attempt to locate GUIDs in $Data and match them with their corresponding user, group, device, or service principal recursively by checking each key/value once located lets store these mapped values in a CIPP$KeyName property
212212
Write-Information 'Checking Data for GUIDs to map to users, groups, devices, or service principals'

0 commit comments

Comments
 (0)