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 Security | Intune | Other
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 123.7K Reputation points MVP Volunteer Moderator
    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.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.