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

Rod Trent
Released: August 17, 2020
Tables
IntuneDeviceComplianceOrg
Keywords
IntuneDevicesCompliantDeviceHealthThreatLevelComplianceStateTimeGeneratedDeviceNameDeviceIdOSUserNameUserEmail
Operators
isnotemptywhere!=project