Forum Discussion
physicalMemoryInBytes always returns 0 with called from ServiceNow
Hello,
I am trying to fetch physicalMemoryInBytes for Intune devices from ServiceNow. I tried calling this info by using below endpoints:
https://graph.microsoft.com/beta/deviceManagement/manageddevices('1111-2222-3333-abc4-55aa55bb55')?$select=id,physicalMemoryInBytes
https://graph.microsoft.com/beta/deviceManagement/manageddevices('1111-2222-3333-abc4-55aa55bb55')?$select=id,hardwareinformation,physicalMemoryInBytes
In both cases I'm getting below error error:
Failed to iterate on data stream: com.glide.transform.transformer.exceptions.InvalidPathException: Could not find path in stream: $.value
I referred to this Intune article but no luck:
Can someone help with this?
2 Replies
- Bogdan_GuineaIron Contributor
Your query is correct.
Have you already consented to the "DeviceManagementManagedDevices.Read.All" permission for your user?
Did you try to run the query without an ID and without $select?
Good luck!- tanmay111Copper Contributor
Yes, the permission is granted. I think I was had set api version v1.0 along with the beta URL which was failing. Now with api version removed when I tested by statically passing the device ID in beta endpoint mentioned in my query, I can see the physicalMemoryInBytes is being returned. I just need to make it work for dynamic device ID values.
Thanks