Forum Discussion

ycd_tech's avatar
ycd_tech
Copper Contributor
Dec 02, 2021

physicalMemoryInBytes always returns 0

I followed the blog below,

https://techcommunity.microsoft.com/t5/microsoft-intune/total-physical-memory-attribute-graph-location/m-p/2108126

 

Here is my API endpoint. 

https://graph.microsoft.com/beta/deviceManagement/manageddevices('1111-2222-3333-abc4-55aa55bb55')?$select=id,physicalMemoryInBytes

 

Here is the response,

{"@odata.context":"https://graph.microsoft.com/beta/$metadata#deviceManagement/managedDevices(id,physicalMemoryInBytes)/$entity","id":"1111-2222-3333-abc4-55aa55bb55","physicalMemoryInBytes":0}

 

The expected response is 32GB (in bytes).

 

Can someone please help?

 

    • Simon1919's avatar
      Simon1919
      Brass Contributor
      Thanks Harm, but unfortunately this isn't resolving this issue for me

      I have replicated your query exactly, but firstly Graph does not recognize the property hardwareInformation : Parsing OData Select and Expand failed: Could not find a property named 'hardwareInformation' on type 'microsoft.graph.managedDevice'.

      I've tried similar queries replacing hardwareInformation with other random properties, and the results always return as 0 for physicalMemoryInBytes. Tried devices of all OS types as well, and get the same result whether I query data for all devices or a single device Id.

      Here's an example query context
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceManagement/managedDevices(operatingSystem,physicalMemoryInBytes)/$entity",
      "operatingSystem": "Windows",
      "physicalMemoryInBytes": 0

      No matter what I try, always getting 0. The only thing I can think of is because it's defaulting to v1.0 instead of Beta? Or this is just broken

      First I tried the Graph PowerShell SDK (because I prefer PowerShell, naturally), but I get 0 values for physicalMemoryInBytes for all devices returned from this command:
      Get-MgDeviceManagementManagedDevice

      Not finding anything else on the net, I wonder if this has been raised with MS..

      I need to pull a report on company inventory including RAM 😞
      Think I'm going to do it manually from Intune GUI. Lucky not such a big tenant in this case, but really should expect this should work by now?
      Surely I'm not the only one who still needs to get device inventory including Memory size, unless there's a different location to get it..
      • Have tried that too in the last few months, nothing 😞 I see more people asking for this information, but no response/update yet

Resources