We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ef06a1 commit 5033884Copy full SHA for 5033884
1 file changed
Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1
@@ -27,6 +27,7 @@ function New-GraphPOSTRequest {
27
$Headers = $Headers
28
} else {
29
$Headers = Get-GraphToken -tenantid $tenantid -scope $scope -AsApp $asapp -SkipCache $skipTokenCache
30
+ $body = Get-CIPPTextReplacement -TenantFilter $tenantid -Text $body -EscapeForJson
31
}
32
if ($AddedHeaders) {
33
foreach ($header in $AddedHeaders.GetEnumerator()) {
@@ -41,8 +42,6 @@ function New-GraphPOSTRequest {
41
42
if (!$contentType) {
43
$contentType = 'application/json; charset=utf-8'
44
- #Only do text replacement if no headers are set.
45
- if (!$headers) { $body = Get-CIPPTextReplacement -TenantFilter $tenantid -Text $body -EscapeForJson }
46
47
$RetryCount = 0
48
$RequestSuccessful = $false
0 commit comments