File tree Expand file tree Collapse file tree
Modules/CIPPCore/Public/GraphHelper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,16 +27,18 @@ function New-GraphPOSTRequest {
2727 $Headers = $Headers
2828 } else {
2929 $Headers = Get-GraphToken - tenantid $tenantid - scope $scope - AsApp $asapp - SkipCache $skipTokenCache
30- $body = Get-CIPPTextReplacement - TenantFilter $tenantid - Text $body - EscapeForJson
3130 }
3231 if ($AddedHeaders ) {
3332 foreach ($header in $AddedHeaders.GetEnumerator ()) {
3433 $headers.Add ($header.Key , $header.Value )
3534 }
3635 }
3736
37+ $body = Get-CIPPTextReplacement - TenantFilter $tenantid - Text $body - EscapeForJson
38+
3839 if (! $headers [' User-Agent' ]) {
39- $headers [' User-Agent' ] = " CIPP/$ ( $env: CippVersion ?? ' 1.0' ) "
40+ $headers [' User-Agent' ] = Get-CippUserAgent
41+ Write-Information " User-Agent: $ ( $headers [' User-Agent' ]) "
4042 }
4143
4244 if (! $contentType ) {
You can’t perform that action at this time.
0 commit comments