Detection rules › Panther
Intune Device Not Compliant
Microsoft Intune allows administrators to manage devices and enforce compliance with established policies. This detection identifies devices that are not compliant with the established policies.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Discovery | T1652 Device Driver Discovery |
Rule body yaml
AnalysisType: rule
Filename: intune_device_not_compliant.py
RuleID: "Intune.DeviceNotCompliant"
DisplayName: "Intune Device Not Compliant"
Enabled: true
LogTypes:
- MicrosoftIntune.OperationalLogs
Tags:
- InTune
Severity: Low
Reports:
MITRE ATT&CK:
- "TA0005:T1652"
Description: Microsoft Intune allows administrators to manage devices and enforce compliance with established policies. This detection identifies devices that are not compliant with the established policies.
Runbook: Review the Description field for information about the policy that the device is not compliant with. This is typically easier to review and investigate in the Intune portal.
DedupPeriodMinutes: 60
Threshold: 1
Reference: https://learn.microsoft.com/en-us/intune/intune-service/protect/compliance-policy-monitor
Tests:
- Name: Device Reported Not Compliant
ExpectedResult: true
Log:
{
"category": "OperationalLogs",
"operationName": "Compliance",
"properties":
{
"AADTenantId": "11111111-2222-3333-4444-555555555555",
"AlertDisplayName": "Managed Device TestDevice_8/2/2024_6:32 PM is not Compliant",
"AlertType": "Managed Device Not Compliant",
"Description": "DefaultDeviceCompliancePolicy.RequireRemainContact||DefaultDeviceCompliancePolicy.RequireRemainContact||DefaultDeviceCompliancePolicy.RequireRemainContact||Expected recent contact. Last contact: 2025-03-27 17:35:40Z||2025-03-27 17:35:40Z||ComplianceCalculation",
"DeviceDnsDomain": "",
"DeviceHostName": "TestDevice",
"DeviceName": "TestDevice_8/2/2024_6:32 PM",
"DeviceNetBiosName": "TestDevice",
"DeviceOperatingSystem": "Windows 10.0.26100.2894",
"IntuneAccountId": "11111111-2222-3333-4444-555555555555",
"IntuneDeviceId": "11111111-2222-3333-4444-555555555555",
"IntuneUserId": "11111111-2222-3333-4444-555555555555",
"OperationalLogCategory": "DeviceCompliance",
"ScaleUnit": "AMSUA0602",
"ScenarioName": "Microsoft.Management.Services.Diagnostics.SLAEvents.DeviceNotInComplianceSecurityAlert",
"StartTimeUtc": "2025-04-02T05:57:59.4097Z",
"UPNSuffix": "test.com",
"UserDisplayName": "Device Enrollment Manager",
"UserName": "testuser",
},
"resultType": "None",
"tenantId": "11111111-2222-3333-4444-555555555555",
"time": "2025-04-02T05:57:59.4097000Z",
}
- Name: Device Enrollment
ExpectedResult: False
Log:
{
"category": "OperationalLogs",
"operationName": "Enrollment",
"properties":
{
"AADDeviceId": "11111111-2222-3333-4444-555555555555",
"AADTenantId": "11111111-2222-3333-4444-555555555555",
"EnrollmentTimeUTC": "2025-04-09T15:59:08.5840Z",
"EnrollmentType": "WindowsAzureADJoin",
"FailureCategory": "Not Applicable",
"FailureReason": "Unknown",
"IntuneAccountId": "11111111-2222-3333-4444-555555555555",
"IntuneDeviceId": "11111111-2222-3333-4444-555555555555",
"IntuneUserId": "11111111-2222-3333-4444-555555555555",
"MessageId": "11111111-2222-3333-4444-555555555555",
"OperationalLogCategory": "DeviceEnrollment",
"Os": "Windows",
"OsVersion": "10.0.26100.1742",
"ScaleUnit": "AMSUA0602",
"ScenarioName": "Microsoft.Management.Services.Diagnostics.SLAEvents.EnrollmentSLAEvent",
},
"resultType": "Success",
"tenantId": "11111111-2222-3333-4444-555555555555",
"time": "2025-04-09T15:59:08.5840000Z",
}
Detection logic
Condition
operationName eq "compliance"
properties.AlertType eq "managed device not compliant"
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
operationName | eq |
|
properties.AlertType | eq |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
Operating System | properties.DeviceOperatingSystem |
User | properties.UserName |
User Display Name | properties.UserDisplayName |
Description | properties.Description |
DeviceHostName | properties.DeviceHostName |