Trying to get Intune device hardware information with Graph, but some of the data comes back null

Nick Eckermann 456 Reputation points
2022-09-23T13:32:08.487+00:00

Hello I am trying to get Intune device hardware data with Graph and I am not having any luck. Most of it comes back null
At this point I am just trying to get the System Management BIOS version which shows in Intune on the hardware tab of a device.

Using this command (Get-MgDeviceManagementManagedDevice -ManagedDeviceId $ManagedDevice.Id).HardwareInformation

244336-image.png

The documentation show it should return data.
https://learn.microsoft.com/en-us/graph/api/intune-devices-windowsmanageddevice-get?view=graph-rest-beta
https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-hardwareinformation?view=graph-rest-beta

The graph explorer also returns null data.
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices/xxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxx
244362-image.png

The data is in Intune as you can see here. Where is this data stored in Graph?
244296-image.png

Any help would be appreciated.

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

Accepted answer
  1. HRob 76 Reputation points
    2022-11-08T07:50:15.493+00:00

    There is an issue with the Graph API for Hardware Info - it's with the product group: https://learn.microsoft.com/en-us/answers/questions/853673/microsoft-graph-api-physical-memory-info-for-manag.html

    Suggest this has flow on effects to all the other PowerShell modules.

    Add $select=hardwareInformation to the end of your graph explorer query to get the info.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Lu Dai-MSFT 28,356 Reputation points
    2022-09-26T01:33:50.167+00:00

    @Nick Eckermann Thanks for posting in our Q&A.

    From your description, it seems an issue. Generally, if we can see the bios-version in intune portal, we will see it via Graph. Honestly, I couldn't repeat this situation because the Bios-version shows null in my intune portal and also shows null via Graph.

    Please understand that graph issue is more related to develop scope. With Q&A limitation resources, it is suggested to create an onlin support ticket to get more accurate help. Here is the support link:
    https://learn.microsoft.com/en-us/mem/get-support

    Thanks for your understanding.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Fred 1 Reputation point
    2022-11-03T14:41:41.51+00:00

    Look at this page, where it get's an output to the hardwareinformation.
    https://wetterssource.com/get-device-notes-from-graph

    0 comments No comments

  3. Nick Eckermann 456 Reputation points
    2022-11-17T15:55:46.963+00:00

    Based on comments from @Lu Dai-MSFT

    I was able to accomplish what I needed with this.

    Disconnect-Graph  
    Connect-MgGraph -Scopes DeviceManagementManagedDevices.Read.All, Directory.ReadWrite.All  
    Select-MgProfile -Name beta  
    $ManagedDevices = Get-MgDeviceManagementManagedDevice -Filter "Model eq 'HP EliteBook 840 G8 Notebook PC'"  
      
    foreach ($ManagedDevice in $ManagedDevices){  
        # Get hardware details for the device  
        $ManagedDeviceHardware = (Get-MgDeviceManagementManagedDevice -ManagedDeviceId $ManagedDevice.Id -Property "hardwareInformation").HardwareInformation  
      
        # Flag which basebase board the device is and add ExtensionAttribute per baseboard  
        if (($ManagedDeviceHardware.Model -eq 'HP EliteBook 840 G8 Notebook PC') -and ($ManagedDeviceHardware.SystemManagementBiosVersion -like 'T76*')){  
            Write-Output -InputObject "$($ManagedDevice.DeviceName) is a HP EliteBook 840 G8 Notebook PC with the 880D Baseboard"  
            # Parameters for setting ExtensionAttribute  
            $Parameters = @{  
                ExtensionAttributes = @{  
                    ExtensionAttribute1 = "HP EliteBook 840 G8 Notebook PC 880D"  
                }  
            }  
            # Add ExtensionAttribute1 to Device  
            Update-MgDevice -DeviceId $ManagedDevice.Id -BodyParameter $Parameters  
      
        }elseif (($ManagedDeviceHardware.Model -eq 'HP EliteBook 840 G8 Notebook PC') -and ($ManagedDeviceHardware.SystemManagementBiosVersion -like 'T39*')) {  
            Write-Output -InputObject "$($ManagedDevice.DeviceName) is a HP EliteBook 840 G8 Notebook PC with the 8AB3 Baseboard"  
            # Parameters for setting ExtensionAttribute  
            $Parameters = @{  
                ExtensionAttributes = @{  
                    ExtensionAttribute1 = "HP EliteBook 840 G8 Notebook PC 8AB3"  
                }  
            }  
            # Add ExtensionAttribute1 to Device  
            Update-MgDevice -DeviceId $ManagedDevice.Id -BodyParameter $Parameters  
      
        }elseif (($ManagedDeviceHardware.Model -eq 'HP EliteBook 840 G8 Notebook PC') -and ($ManagedDeviceHardware.SystemManagementBiosVersion -like 'T37*')) {  
            Write-Output -InputObject "$($ManagedDevice.DeviceName) is a HP EliteBook 840 G8 Notebook PC with the 8AB8 Baseboard"  
            # Parameters for setting ExtensionAttribute  
            $Parameters = @{  
                ExtensionAttributes = @{  
                    ExtensionAttribute1 = "HP EliteBook 840 G8 Notebook PC 8AB8"  
                }  
            }  
            # Add ExtensionAttribute1 to Device  
            Update-MgDevice -DeviceId $ManagedDevice.Id -BodyParameter $Parameters  
        }else {  
            Write-Output -InputObject "Unable to determine the Baseboard "  
        }  
    }  
    
    0 comments No comments

  4. Dave Randall 86 Reputation points Microsoft Employee
    2023-03-09T15:40:40.97+00:00

    Some attributes also need a $select to pull the property. When you're doing a LIST on multiple managed devices, some properties are not returned in the LIST. You'll need to do a GET on the specific managed device, and include $select in the URL with the properties you want to retrieve.

    0 comments No comments