Skip to content

Commit 355c0ba

Browse files
committed
fix: update SAS response format
1 parent 2f4384b commit 355c0ba

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippLogsSas.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Invoke-ExecCippLogsSas {
2222
if ($p -match '^(.+?)=(.+)$') { $conn[$matches[1]] = $matches[2] }
2323
}
2424

25-
$Days = [int]($Request.Query.Days ?? $Request.Body.Days ?? 365)
25+
$Days = [int]($Request.Body.Days ?? $Request.Query.Days ?? 365)
2626
if ($Days -lt 1 -or $Days -gt 3650) {
2727
throw 'Days must be between 1 and 3650'
2828
}
@@ -45,8 +45,10 @@ function Invoke-ExecCippLogsSas {
4545
Add-CIPPAzDataTableEntity @SASTable -Entity $Entity -Force
4646

4747
$Body = @{
48-
SASUrl = $Sas.ResourceUri + $Sas.Token
49-
ExpiresOn = $Sas.Query['se']
48+
Results = @{
49+
SASUrl = $Sas.ResourceUri + $Sas.Token + '&$format=application/json;odata=nometadata'
50+
ExpiresOn = $Sas.Query['se']
51+
}
5052
}
5153
$StatusCode = [HttpStatusCode]::OK
5254
} catch {

0 commit comments

Comments
 (0)