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

%3CLINGO-SUB%20id%3D%22lingo-sub-2541383%22%20slang%3D%22en-US%22%3EResearching%20for%20a%20API%20to%20get%20only%20modified%20managed%20devices%20in%20Endpoint%20manager%20(Intune)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2541383%22%20slang%3D%22en-US%22%3E%3CP%3ETo%20fetch%20the%20managed%20devices%20I'm%20using%20following%20the%20API%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fintune-devices-manageddevice-get%3Fview%3Dgraph-rest-1.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fintune-devices-manageddevice-get%3Fview%3Dgraph-rest-1.0%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20fetch%20only%20the%20devices%20which%20are%20updated%20(%20some%20change%20in%20the%20returned%20attributes%20)%3C%2FP%3E%3CP%3Ea.%20after%20a%20certain%20time.(%20say%20after%20June%2015%202020)%3C%2FP%3E%3CP%3Eb.%20after%20the%20last%20time%20I%20fetched%20managed%20devices%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2541383%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
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
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 :(