Microsoft Entra Suite Tech Accelerator
Aug 14 2024, 07:00 AM - 09:30 AM (PDT)
Microsoft Tech Community
SOLVED

MDE API - How to get all devices?

Iron Contributor
I‘m currently trying to get alle device objects from MDE via REST API. Unfortunately, I only get 10.000 of my 23.000 machines.
The API Documentation states that the maximum pagesize is 10.000, but there is no hint or example where to get the other 13.000 machines that are still missing.

Anyone got the same problem or has a solution?

Best regards
Stefan
5 Replies

Since the maximum number of numbers is the number of steps, consider using "| summarize make_list(DeviceName)" Advanced Hunting API etc. to reduce the number of line counts.

best response confirmed by SteBeSec (Iron Contributor)
Hi Luiza,
thank you, I wasn't aware of that and will try this :)

Best regards
Stefan
Whenever you do a REST call and not all data is returned, you should see a property that contains another link with the rest of the data.
It's comparable to the Graph API way of doing pagination: https://docs.microsoft.com/en-us/graph/paging
Thanks, the @odata.nextLink did the trick. Thank you very much.
1 best response

Accepted Solutions
best response confirmed by SteBeSec (Iron Contributor)