Graph API to get ConfiguraionManagerClientHealthState

Chetan Sharma 106 Reputation points
2022-10-10T19:57:35.753+00:00

Hi All,

I need help with exporting a very specific property from devices enrolled as 'Co-Managed' in Intune. I am looking for a way to export the value 'configurationmanagerclienthealthstate' for all of our co-managed workstations using the graph APIs. Where I can pull almost all other values but this one in specific, I am unable to export.

Does anybody know a way or, script to export the data? To be very precise, this data is reflected for co-managed devices in Intune. Just want to understand if there is a way to get that out in a report.

Thanks
Chetan S.

Windows Autopilot
Windows Autopilot
A collection of Microsoft technologies used to set up and pre-configure new devices and to reset, repurpose, and recover devices.
437 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 45,906 Reputation points Microsoft Vendor
    2022-10-11T02:39:08.683+00:00

    @Chetan Sharma , I have custom a script comanageddevices-get.ps1. It can query out all the comanaged device and its configurationManagerClientHealthState.

    249079-image.png

    It is in the attachment. As upload the attachment does not support to upload ps1. I have changed the format to txt. You can change back and run with administrator in Powershell ISE. Hope it can help.


    If the answer is helpful, 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.


1 additional answer

Sort by: Most helpful
  1. Crystal-MSFT 45,906 Reputation points Microsoft Vendor
    2022-10-11T01:27:30.407+00:00

    @Chetan Sharma , To query the "ConfiguraionManagerClientHealthState" of the device via Graph, based on my test, I find we can query this via the following method:
    URL: https://graph.microsoft.com/beta/deviceManagement/manageddevices('deviceid')?$select=deviceName,configurationManagerClientHealthState
    Note: {lease change the device id with the one in your environment.
    Modify permissions (preview), consent the following permission.
    DeviceManagementManagedDevices.Read.All
    DeviceManagementManagedDevices.ReadWrite.All
    249143-image.png
    You can try. For the script, after researching, I didn't find a specific one. I will do more researching to see if I can find some similar one to help.

    Hope it can help.


    If the answer is helpful, 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