List managed devices API returns null for ethernetMacAddress

crestiot 0 Reputation points
2023-10-05T13:35:30.54+00:00

When querying managed devices through list managed devices Graph API (v1.0) the ethernetMacAddress stays null, while if I query single device, then I get the ethernetMacAddress. Even on https://endpoint.microsoft.com/ portal, I'm able to see mac address
Is this permission issue?
I have configured below permissions
User's image

When querying list of managed devices with '/deviceManagement/managedDevices' , I get null for ethernetMacAddress
User's image

But if I query single device, I get mac address
User's image

Referred https://learn.microsoft.com/en-us/answers/questions/732046/devicemanagement-manageddevices-missing-mac-addres, but didn't find solution. Is there a way to get all managed devices without nullifying fields.

Note that in description for ethernetMacAddress in https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-manageddevice?view=graph-rest-1.0, it is mentioned that default value for ethernetMacAddress is null, but we need a way to list all managed devices without individual get call to each device.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,839 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,480 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 97,076 Reputation points MVP
    2023-10-05T14:53:48.61+00:00

    I suppose you didn't read the second part of the property's description? :)

    Indicates Ethernet MAC Address of the device. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity. Individual get call with select query options is needed to retrieve actual values. Example: deviceManagement/managedDevices({managedDeviceId})?$select=ethernetMacAddress Supports: $select. $Search is not supported. Read-only. This property is read-only.

    The same behavior is observed by other properties/resources across the Graph, you get null/default values when using the LIST method, and have to use individual GET requests (with or without $select) to get the "real" property value.