Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community

Get all Machine names list form defender

Copper Contributor

hello, I was using postman to list all the machine using this endpoint. https://api-us.securitycenter.microsoft.com/api/machines

When I issue a get command, I can only see 49 items, when I go to this Microsoft 365 defender, I see lot of records. https://security.microsoft.com/machines   

Tried adding? page=1 to 10 no change in data set. 

Regards

Sunny

 

1 Reply
When I invoke 'https://api-us.securitycenter.microsoft.com/api/machines' via our Powershell cmdlet I get all our ~2500 machines back. To me, this suggests the problem lies in how you are invoking it rather than the API having a built in limit. But, there is a 10k items page limit on the API so if you have more than that you will need some sort of page/limit logic. But if you are only getting 49 something else is going on.