MSRC-Microsoft-Security-Updates-API icon indicating copy to clipboard operation
MSRC-Microsoft-Security-Updates-API copied to clipboard

Get-MsrcSecurityUpdate gives InternalServerError

Open LunaReX-bit opened this issue 2 years ago • 3 comments

Get-MsrcSecurityUpdate -After 2022-07-13 -Before 2022-08-09
Running this command got the below error

Get-MsrcSecurityUpdate: HTTP Get failed with status code InternalServerError: WARNING: No results returned from the /Update API

LunaReX-bit avatar Aug 18 '22 18:08 LunaReX-bit

Indeed, here's how to reproduce:

$Error.Clear()
Invoke-RestMethod -Method get -Uri 'https://api.msrc.microsoft.com/cvrf/v2.0/Updates?$filter=InitialReleaseDate gt 2023-01-10T08:00:00Z'
$Error| fl * -Force

It returns 'Response status code does not indicate success: 500 (CVRF API Error) ' and says 'Something has gone wrong, please try again later.'

It's clearly a bug, because the official API ref https://api.msrc.microsoft.com/cvrf/v2.0/swagger/index says:

This list can be manipulated using OData URL filtering on current and initial release dates.

The Odata part is correct because if there's wrong filter, it says

$Error.Clear()
Invoke-RestMethod -Method get -Uri 'https://api.msrc.microsoft.com/cvrf/v2.0/Updates?$filter=InitialReleaseData gt 2023-01-10T08:00:00Z'
$Error| fl * -Force

Error 400

{"error":{"code":"","message":"OData URI failed validation Could not find a property named 'InitialReleaseData' on type 'CvrfWeb.Models.Update'."}}

p0w3rsh3ll avatar Apr 23 '23 19:04 p0w3rsh3ll

Ran into this error trying to figure out a way to get only latest updates

Calling https://api.msrc.microsoft.com/Updates?$filter=CurrentReleaseDate ge 2018-01-01T00:00:00Z returns 500 error with message "Something has gone wrong, please try again later." while specifying wrong filter returns error 400 with correct error message

redbaron4 avatar May 11 '23 10:05 redbaron4

As of January 2024, it appears that the issue is still present – we are unable to filter by the CurrentReleaseDate parameter.

MateuszBelczowski avatar Jan 18 '24 10:01 MateuszBelczowski