0

Is there a way to identify a mobile device from the following Graph API endpoint?

GET https://graph.microsoft.com/beta/deviceManagement/managedDevices

Currently we have a mix of mobile devices and Windows PC's loaded into Intune but having looked at the deviceManagement/managedDevices resource using MS Graph, I cannot identify a way to filter on just mobile devices. I can see that there is an imei property, which is understandably set for mobile devices and I can see that it is but for items that are not mobile devices, it is set to " ". The problem I have is that I cannot filter out results based on blank values, which I understand is not supported by Microsoft on the MS Graph. So for example a query like this is not working,

https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=imei+ne+' '

I've had a look at the properties returned by the resource deviceManagement/managedDevices but I could not spot anything that clearly marked an item as a mobile device. Is there another way I can filter out the blank values or is there another property I could use instead to identify that it is a mobile device?

Pradeep Patel
  • 471
  • 1
  • 6
  • 23

1 Answers1

0

Based on this article and my tests filter with ne does not work on this specific endpoint (or it does the same as eq). So with this property you can only filter the values you want.

Would it be a possibility to filter the mobile devices on this endpoint based on the property operatingSystem?

You could filter the output with something like this:

https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=operatingSystem eq 'Android' or operatingSystem eq 'iOS'

In my tenant I only have Windows devices, so I am not sure if the names in my query (Android and iOS) are the correct values.

fabrisodotps1
  • 117
  • 1
  • 10