Skip to content

Commit 942ff39

Browse files
committed
chore: consolidate graph log message
1 parent fa8a589 commit 942ff39

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function New-GraphPOSTRequest {
3838

3939
if (!$headers['User-Agent']) {
4040
$headers['User-Agent'] = Get-CippUserAgent
41-
Write-Information "User-Agent: $($headers['User-Agent'])"
4241
}
4342

4443
if (!$contentType) {
@@ -50,7 +49,7 @@ function New-GraphPOSTRequest {
5049
$RawErrorBody = $null
5150
do {
5251
try {
53-
Write-Information "$($type.ToUpper()) [ $uri ] | tenant: $tenantid | attempt: $($RetryCount + 1) of $maxRetries"
52+
Write-Information "$($type.ToUpper()) [ $uri ] | tenant: $tenantid | user-agent: $($headers['User-Agent']) | attempt: $($RetryCount + 1) of $maxRetries"
5453
$ReturnedData = (Invoke-CIPPRestMethod -Uri $($uri) -Method $TYPE -Body $body -Headers $headers -ContentType $contentType -SkipHttpErrorCheck:$IgnoreErrors -ResponseHeadersVariable responseHeaders)
5554
$RequestSuccessful = $true
5655
} catch {

0 commit comments

Comments
 (0)