Forum Discussion
dmj86
Jan 02, 2024Copper Contributor
List vulnerabilities API - Max results 8000?
Hi, Someone knows why there has been a limit since last December 2023 in the results of this request? I have built an powerbi report that connects and uses the information in tables from this api ...
jbmartin6
Jan 02, 2024Iron Contributor
The online documentation only mentions limit of 8000 when using oData $top filter: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/api/get-all-vulnerabilities?view=o365-worldwide
- jbmartin6Jan 02, 2024Iron ContributorMy guess is they don't want to be supplying a global vulnerability database so there is a limit of 8000 on unfiltered queries. You could probably get more data via the advanced hunting API if you really wanted. But why are you trying to dump every known vulnerability? You might have better luck using the Vulnerabilities/machinesVulnerabilities API, that will only return 10k results but provides an @odata.nextlink property in the response that you can use to get the next page.
- jbmartin6Jan 02, 2024Iron ContributorYou might also try using the odata $skip option to get the next 8000 e.g. https://api-us.securitycenter.microsoft.com/api/Vulnerabilities?$skip=8000 . I have not tried this but the doc says $skip is supported
- dmj86Jan 03, 2024Copper Contributor
Yeah, I understand it like this too at first. But the limit seems to be there, regardless of whether you use top or not.