Query Details
# Defender for Endpoint - Exposure Level
## Query Information
### Description
Summaries of devices with Exposure Levels.
You could use this query to run in a Sentinel Summarization rule every 24 hours to keep a log of your exposure levels.
#### References
### Microsoft Sentinel
```kql
DeviceInfo
//| where TimeGenerated > ago(1d)
| where OnboardingStatus == 'Onboarded'
| summarize arg_max(TimeGenerated, *) by DeviceId
| summarize
Low = dcountif(DeviceId, ExposureLevel == 'Low'),
Medium = dcountif(DeviceId, ExposureLevel == 'Medium'),
High = dcountif(DeviceId, ExposureLevel == 'High'),
None = dcountif(DeviceId, ExposureLevel == 'None')
| extend Time = now()
```kql
This KQL (Kusto Query Language) query is designed to summarize the exposure levels of devices managed by Microsoft Defender for Endpoint. Here's a simple breakdown of what the query does:
DeviceInfo table.TimeGenerated timestamp.The output will give you a summary of how many devices fall into each exposure level category at the current time. This query can be scheduled to run every 24 hours in Microsoft Sentinel to keep a daily log of device exposure levels.

Alex Verboon
Released: September 12, 2024
Tables
Keywords
Operators