Query Details
//Intune Devices Not Compliant IntuneDeviceComplianceOrg | where isnotempty(DeviceHealthThreatLevel) | where ComplianceState != "Compliant" | project TimeGenerated , ComplianceState , DeviceName , DeviceId , OS , UserName , UserEmail
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.

Rod Trent
Released: August 17, 2020
Tables
Keywords
Operators