microsoft / MSRC-Microsoft-Security-Updates-API

Repo with getting started projects for the Microsoft Security Updates API (msrc.microsoft.com/update-guide)
https://msrc.microsoft.com/update-guide
MIT License
366 stars 115 forks source link

Get-MsrcSecurityUpdate gives InternalServerError #108

Open LunaReX-bit opened 2 years ago

LunaReX-bit commented 2 years ago

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

p0w3rsh3ll commented 1 year ago

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'."}}

redbaron4 commented 1 year ago

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

MateuszBelczowski commented 10 months ago

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