SOLVED

Researching for an API to get only modified managed devices in Endpoint manager (Intune)

New Contributor

To fetch the managed devices I'm using following the API
https://docs.microsoft.com/en-us/graph/api/intune-devices-manageddevice-get?view=graph-rest-1.0

 

Is it possible to fetch only the devices which are updated ( some change in the returned attributes )

a. after a certain time.( say after June 15 2020)

(or)

b. after the last time I fetched managed devices

 

 

Thanks in advance :)

1 Reply
best response confirmed by Arun_Joseph (New Contributor)
Solution
Graph API supports the $filter URL parameter, but it requires an attribute to filter on. I do not see a "last changed" attribute that can be used for the specific API call you mentioned. There's a few timestamps, but those seem to be related to other activities happening. Perhaps one of those can be used, but I wouldn't be sure which one to be honest.

The only other option if this doesn't exist would be to custom build something. We do this in a few cases, where we leverage Azure Storage Tables to create a hash over the attributes we want to monitor for change, and use this in combination with a stored date to check if there were changes. Not ideal to be honest :(