In this section

Defender for Endpoint Onboarding and Sensor Health: Reading DeviceInfo for Coverage

Module 0

Introduction

Every control in this course runs on a device that has the Defender for Endpoint sensor, and every record the last lesson read came from one.

A device without the sensor gets none of the protection the rest of the course configures, and shows up in none of the queries an engineer uses to check it. So the first engineering question about an estate is not how well it is configured. It is whether the sensor is on every device, and whether it is working.

The device inventory answers that, if it is read carefully. Read carelessly, it gives a reassuring number that is wrong in both directions: it counts devices twice, and it misses devices nobody onboarded. This lesson reads the estate's inventory for both, and for the device groups that decide which policy reaches which machine. Every query is the kind an engineer runs weekly, and every one is short enough to remember.

1. Discoveredseen on the network; "Can be onboarded"; no sensor at all2. Onboardedthe sensor is installed and has reported3. Activereporting now4. Misconfiguredreporting partly: impaired communications, or no sensor data5. Inactivenothing for more than seven days: off, reinstalled, offboarded or broken

The states a device moves through, from the sensor-health guidance; only one of them means protected and reporting.

The figure is built from Microsoft's guidance on sensor health. A device moves from discovered to onboarded to active, and can fall out of active in two directions: misconfigured, when it reports only partly, and inactive, when it has not reported for more than seven days.

Module 2 teaches each transition and how to fix it. Two of the states, misconfigured and inactive, are where most real coverage gaps hide, because the device still exists in every list and still looks managed.

01

What the Inventory Claims

The latest record for each device

DeviceInfo holds a stream of records per device, one each time the service refreshes the device's details. The current state of the estate is the latest record for each device ID, which arg_max returns. Grouped by onboarding status and sensor health, the estate looks like this:

DeviceInfo
| summarize arg_max(Timestamp, *) by DeviceId
| summarize Devices = count() by OnboardingStatus, SensorHealthState
| order by Devices desc

Grouping the latest records by those two columns gives three lines:

OnboardingStatus  SensorHealthState  Devices
----------------  -----------------  -------
Onboarded         Active             20
Can be onboarded                     1
Onboarded         Inactive           1

20 records onboarded and active, one onboarded and inactive, and one that can be onboarded and has no health state at all. On a dashboard that becomes a coverage figure: 20 of 22 reporting. The figure looks precise, and it is answering the wrong question, because it counts records rather than machines.

There is a second problem with the figure, which is what it leaves out. Every record in DeviceInfo exists because something reported it: a sensor, or a sensor's view of the network around it. A device that no sensor has ever seen is not in the table at all, so no query of this table can count it.

The inventory is the starting point of a coverage check, not the whole of it; Module 2 adds the sources outside Defender, such as the directory, the device management service and the network's own address records, that list the machines an inventory built by sensors cannot.

The difference is visible as soon as the same latest records are counted two ways:

DeviceInfo
| summarize arg_max(Timestamp, *) by DeviceId
| summarize Records = count(), Names = dcount(DeviceName)

Counted both ways at once, the latest records give:

Records  Names
-------  -----
22       21

22 device records and 21 distinct names. One name has two records. That is not an error in the data; it is how the service behaves, and the next section reads the device it happened to. The same thing happens on every estate that reinstalls machines, which is every estate, so a count by name is never the same as a count of protected devices.

A coverage figure is only as honest as its denominator. The rest of this lesson builds the right one: devices, not records, and every device on the network, not only those that have a sensor to report from. It also builds the habit of asking, of every number on a security dashboard, what its denominator is and who decided it.

02

One Laptop, Two Records

What a reinstall leaves behind

The name with two records is NE-HARGREAVES-LT, an IT engineer's laptop. Summarized by device ID, its records say when each entity first and last appeared and which health states it has held:

DeviceInfo
| where DeviceName == 'NE-HARGREAVES-LT'
| summarize FirstSeen = min(Timestamp), LastSeen = max(Timestamp),
    States = strcat_array(make_set(SensorHealthState), ', ') by DeviceId
| project Id = substring(DeviceId, 33, 3),
    FirstSeen = format_datetime(FirstSeen, 'yyyy-MM-dd'),
    LastSeen = format_datetime(LastSeen, 'yyyy-MM-dd'), States

The two device IDs, side by side, tell different stories:

Id   FirstSeen   LastSeen    States
---  ----------  ----------  ----------------
073  2026-03-05  2026-03-15  Active
072  2026-03-01  2026-03-15  Inactive, Active

The record ending 073 first appears on 5 March and has only ever been Active. The record ending 072 goes back to the start of the period and has held two states. Its day-by-day record shows when it changed:

DeviceInfo
| where DeviceId == 'd1000000-0000-4000-8000-000000000072'
| project Day = format_datetime(Timestamp, 'yyyy-MM-dd'), SensorHealthState
| order by Day asc

Day by day, the old entity's health state reads like this:

Day         SensorHealthState
----------  -----------------
2026-03-01  Active
2026-03-02  Active
2026-03-03  Active
2026-03-04  Active
2026-03-05  Active
2026-03-12  Inactive
2026-03-13  Inactive
2026-03-14  Inactive
2026-03-15  Inactive

Active every day until 2026-03-05, then six days with no record at all, then Inactive from 2026-03-12. That is the pattern Microsoft's sensor-health guidance describes for a device that was reinstalled or renamed: a new device entity is created, and the previous one remains with an Inactive status. The seven-day gap is the threshold: a device that sends nothing for more than seven days is treated as inactive.

NE-HARGREAVES-LT, one laptop and two records

A reinstall

Old DeviceId ...072

Active to 2026-03-05, then nothing, then Inactive from 2026-03-12

New DeviceId ...073

first seen 5 March, Active every day since

What happened

the laptop was reinstalled and onboarded again: a new entity

Why it matters

counting names says one device; counting records says two, one of them unprotected

The antivirus scans confirm it from a different table. The old entity's scans stop where the new one's start:

DeviceEvents
| where DeviceName == 'NE-HARGREAVES-LT' and ActionType == 'AntivirusScanCompleted'
| summarize Scans = count(), LastScan = max(Timestamp) by DeviceId
| project Id = substring(DeviceId, 33, 3), Scans, LastScan

Each entity's scans, counted with the last one it reported:

Id   Scans  LastScan
---  -----  -------------------
073  11     2026-03-15 08:12:00
072  4      2026-03-04 08:12:00

The laptop is fine. The inventory carries a leftover that a coverage report must resolve, or it reports one unprotected device that does not exist and, worse, teaches the team to ignore Inactive records, which is how a real one gets missed.

Resolving it is a small piece of routine work with a large effect: confirm the reinstall, then report on the new entity and set the old one aside.

The confirmation is the part that needs a person: an Inactive entity whose name has a new, Active record is very likely a reinstall, but an Inactive entity whose name has no successor is a laptop that stopped reporting, and that one needs someone to find it.

The query that tells the two apart is the one at the top of this section, run across every name in the estate rather than one. Run that way, it lists every name with more than one device ID and shows which of each pair is still reporting, which turns a confusing inventory into a short list of decisions.

03

The Server Nobody Onboarded

A device the sensor can only see from outside

The inventory holds devices with no sensor, too. Onboarded laptops observe the network around them, and device discovery uses that to list machines that have never been onboarded. Filtering for anything not onboarded finds one:

DeviceInfo
| summarize arg_max(Timestamp, *) by DeviceId
| where OnboardingStatus != 'Onboarded'
| project DeviceName, OSPlatform, OnboardingStatus, ClientVersion, DeviceType

The filter returns one record, and it is a server:

DeviceName  OSPlatform         OnboardingStatus  ClientVersion  DeviceType
----------  -----------------  ----------------  -------------  ----------
NE-SQL02    WindowsServer2019  Can be onboarded                 Server

NE-SQL02, a Windows Server 2019 machine, first seen on 4 March. "Can be onboarded" means Defender found it on the network and supports its operating system, but nobody has installed the sensor. It has no client version because there is no client, and no health state because there is nothing to be healthy.

This is the most expensive line in the inventory. Every control in Modules 3 to 8 is configured through the sensor and enforced by it, and NE-SQL02 receives none of them. An attacker who reaches it is invisible to every query in this course except this one.

A database server is also exactly the kind of machine an attacker wants: the last lesson's intrusion ended with a data archive, and the data it would want next lives on servers like this.

The engineering response is not to note it. It is to onboard it, and Module 2 compares the onboarding methods for servers, including the ones that work without Intune, which a server like this often lacks. Until it is onboarded, the honest coverage figure counts it in the denominator: every device that exists, not every device that reports.

The same reasoning applies to the devices discovery cannot see at all, on network segments no onboarded laptop reaches, which is why Module 2 treats discovery as one source among several rather than as the list of record.

The order of work this suggests is simple to state and easy to skip. First establish the full list of devices from every source available. Then establish which of them have a sensor, then which sensors are healthy, and only then which are well configured.

Most estates do this in reverse, because configuration is where the interesting work is, and end up with excellent policy on most of the estate and none at all on the machines nobody remembered.

04

Which Sensor, on What

Client versions by platform

A device that reports is still only as protected as the sensor it runs. The latest onboarded records, grouped by platform and client version, show what the estate is running:

DeviceInfo
| summarize arg_max(Timestamp, *) by DeviceId
| where OnboardingStatus == 'Onboarded'
| summarize Devices = count() by OSPlatform, ClientVersion
| order by Devices desc

Grouped that way, the onboarded estate runs four platform and version combinations:

OSPlatform         ClientVersion       Devices
-----------------  ------------------  -------
Windows11          10.8910.26100.2454  17
WindowsServer2022  10.8910.20348.2849  2
macOS              101.24092.0006      1
Linux              101.24082.0004      1

Every Windows 11 laptop runs the same client version, as do both Windows servers, which is what a managed estate should look like. Version uniformity is worth checking because the sensor's capabilities arrive with its versions: a device several versions behind may be missing detection logic, support for a newer setting or a fix for a known gap, while every dashboard still shows it as Active.

The Linux server and the Mac run version numbers in a different format, because they run a different product: Defender for Endpoint on Linux and on macOS is a separate application from the sensor built into Windows, installed and updated by a package rather than by Windows Update.

That difference shows up in operations. A Windows sensor is updated with the operating system's own servicing, so the estate stays in step largely on its own. The Linux and Mac clients are updated only if somebody has set up the package channel that delivers them, so they drift unless the engineering work includes that.

On an estate with dozens of Linux servers, that channel is a piece of infrastructure in its own right. A version check by platform is the simplest test for drift, and it belongs in the same routine report as the coverage figure.

Module 2 covers the sensor's architecture on each platform and what the cloud side does with what it sends, and Module 8 returns to Linux and macOS in depth. Module 2 also covers what each platform's sensor needs from the network to report at all, which is where most misconfigured devices on the non-Windows platforms come from.

The point here is that one inventory query can show whether the estate runs one sensor or several, and which of them depend on a process somebody has to own.

A version check also catches a failure that health checks miss. A sensor that is installed and reporting but stuck on an old version is Active by every definition the inventory uses.

Only a comparison against the version the rest of the estate runs, or against Microsoft's current release, shows it is behind. Put that comparison in the same weekly report as the coverage figure and the group check, and the three together answer the question this lesson opened with.

05

Groups Decide What Reaches Each Device

Device groups and the device that has none

Defender for Endpoint scopes much of its configuration by device group: which analysts may see a device, how much automated response it gets, and which policies target it. The MachineGroup column records each device's group. The latest records, grouped by it:

DeviceInfo
| summarize arg_max(Timestamp, *) by DeviceId
| summarize Devices = count() by MachineGroup
| order by Devices desc

Grouped by that column, the latest records give:

MachineGroup    Devices
--------------  -------
Workstations    18
                1
Tier 0 servers  1
Servers         1
Linux servers   1

Most devices are in Workstations. The Windows servers are split into Servers and Tier 0 servers, the second for SRV-NGE-MCR-AAD01, the server that synchronizes the directory with Entra ID and so is as sensitive as a domain controller. The Linux server has its own group.

One record has no group, and it is NE-SQL02, the server that was never onboarded: a device has to have a sensor before group rules can place it. The Mac sits in Workstations with the laptops, which may be right for access but means any Windows-only setting scoped to that group has nothing to apply on it.

Group design is an engineering decision with consequences in every later module. A Tier 0 group lets the response settings of Module 7 be stricter for the servers whose compromise ends the estate, and lets access to them be limited to the people who should see them.

A group that lumps servers with workstations makes every policy a compromise between the two. Module 2's lesson on groups, tags and role-based access is where those choices are made, and this inventory is the evidence for whether they were.

Groups are assigned by rules, usually on device name, operating system or tag, and the rules are evaluated in order. That has two consequences an engineer has to plan for. A device that matches no rule falls into a default group, which on most estates gets the default settings, so a naming mistake can quietly move a server out of its group.

And a device has to exist in the inventory, with a sensor reporting its name and platform, before any rule can place it, which is why the unonboarded server here sits in no group at all. Both problems are found the same way: a weekly query for devices in the default group, and for onboarded devices whose group does not match their device type.

06

What Module 2 Builds On It

Onboarding and device health in depth

Module 2 starts with the sensor itself: its architecture, what the cloud side processes, and what each license actually includes, so that a gap in features is not mistaken for a gap in configuration.

It compares the onboarding methods, does onboarding at scale through Intune, onboards servers and Linux, and then validates onboarding and troubleshoots it when the inventory says something like this lesson found. Each of those lessons uses the inventory queries above as its starting point, so the queries are worth running and keeping before Module 2 begins.

What Module 2 builds

Module 2

2.1 to 2.3

the sensor's architecture, cloud-side processing, and what each license actually includes

2.4 to 2.6

onboarding methods compared, Intune onboarding at scale, servers and Linux

2.7 to 2.8

validating onboarding and troubleshooting it; monitoring device health

2.9 to 2.11

device groups, tags and RBAC; mobile devices; an eight-week rollout and its gap

It ends with device health monitoring, groups and access control, mobile devices, and an eight-week rollout that reached 96 per cent and still had a gap, which is this lesson's argument at full size. The figure that matters is not how many records are active. It is which devices that exist are not.

Module 2 also covers the troubleshooting side of this: a device that is onboarded but misconfigured, reporting partly because it cannot reach part of the service, and the analyzer tools and connectivity checks that find the cause.

That half of health monitoring matters on the estates this course is written for, where proxies and network inspection sit between the devices and the service and can break the sensor's channel without anyone noticing.

The habits to carry into it are the ones this lesson used. Read the latest record per device ID, never the raw stream. Count devices, not names and not records, and resolve the leftovers a reinstall creates. Put the devices discovery found in the denominator. Check client versions per platform. And read the group column as the place where every later policy will be scoped.

One more habit is worth adding, because this estate's inventory is small enough to read whole and a real one is not. Every check in this lesson is a query, and every query can be saved and run on a schedule.

The engineer who runs the coverage, version and group checks every week finds the reinstall leftover, the unonboarded server and the drifting client within days. The one who looks only when an incident forces it finds them afterwards, in the timeline of the incident.

Do

Practice

Decide which records mean a protected device
prepared evidence

The prepared evidence below is six records from the inventory, the latest for each device ID, with the last three digits of each ID shown. Find the device with no sensor at all and the record that is a leftover, and decide what a coverage report should count. Each answer comes with its reasoning, so check it against the rows rather than only the choice.

The six records include healthy devices on purpose, a laptop, the Linux server and the Mac, because the skill is telling the records that mean protection from the ones that only look like it.

Answer the first two questions from the OnboardingStatus and SensorHealthState columns alone, then check your answer against the Id column, which is the one a dashboard usually hides.

The third question has no row to select: it asks for the rule a coverage report should follow, and the right answer is the one that would still be right on an estate of ten thousand devices. Then compare your rule with the figure this lesson started from. The gap between them is the size of the mistake a careless report makes on this estate.

Then run the first query on this page and change it to list every record rather than summarizing them, sorted by device name. Find NE-HARGREAVES-LT's two records next to each other, and NE-SQL02 at the bottom of any list sorted by health state, where a dashboard would bury it.

The inventory answers whether the sensor is present and healthy, if it is read by device ID at its latest record. A reinstall leaves an Inactive entity behind under the same name, discovery lists servers nobody onboarded, client versions differ by platform, and groups decide what reaches each device. A coverage figure counts devices that exist, not records that report.

The next lesson asks whether the configuration those sensors enforce actually holds on the device, or can be switched off by anyone on the device with the rights to try.