Query Details

Intune Not Compliant2

Query

//Intune Devices Not Compliant

IntuneDeviceComplianceOrg
| where isnotempty(DeviceHealthThreatLevel)
| where ComplianceState != "Compliant"
| project TimeGenerated , ComplianceState , DeviceName , DeviceId , OS , UserName , UserEmail

Explanation

This query retrieves information about Intune devices that are not compliant. It filters out devices with an empty DeviceHealthThreatLevel and only includes devices with a ComplianceState that is not "Compliant". The resulting data includes the time the information was generated, the compliance state, device name, device ID, operating system, username, and user email.