Skip to content

Commit 63ff49a

Browse files
committed
ensure policy template response is always an array
1 parent 50823eb commit 63ff49a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-ListIntuneTemplates.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function Invoke-ListIntuneTemplates {
8484

8585
return ([HttpResponseContext]@{
8686
StatusCode = [HttpStatusCode]::OK
87-
Body = ($Templates | ConvertTo-Json -Depth 100)
87+
Body = ConvertTo-Json -Depth 100 -InputObject @($Templates)
8888
})
8989

9090
}

0 commit comments

Comments
 (0)