Our lab laptop was Compliant in Intune. Defender reported 640 distinct CVEs on it. Both results were valid: they answered different questions.

That is the problem this report helps an IT team work through. It brings device compliance, vulnerability findings, data age and follow-up actions into one local HTML report, with CSV files for the people who need to investigate. The collector only reads data. It does not patch devices or send the report to anyone.

Public preview 0.1.0-rc.4: live collection validated on one device.

The 14:41 UTC certificate run on 17 November returned 715 CVE/software records representing 640 distinct CVEs. All five collection sections completed. Portal totals and selected findings matched. The weekly scheduling and delivery workflow has not been tested or enabled; the result below is a baseline, not a measured weekly improvement.

Download the public preview on GitHubExplore the synthetic report demoRead the package documentation · Source code · Release notes · ZIP checksum

1. Understand the three signals

Intune complianceThe device's result against its applicable compliance policies.
Defender device riskA separate risk signal. A vulnerability count does not establish an active incident.
Vulnerability findingsReported weaknesses associated with software on the device, with severity and available exploit context.

Read those signals together with their timestamps. A recent Intune sync does not guarantee a fresh Defender assessment. The default 48-hour freshness threshold is this tool's configurable review rule, not a Microsoft scanning SLA.

Here, an “active vulnerability” means a finding returned in the current assessment. It does not mean an attacker is actively exploiting the device. A reported public exploit is useful prioritization context, not evidence of compromise.

2. Prepare access and one device

Start with one approved, enrolled Intune device that is onboarded to the licensed Defender service. Use its Intune managed-device ID, not its name or Entra device ID. The script reads the managed-device record and uses its Entra device ID to find the exact Defender match. It stops short of selecting a device when multiple matches exist.

Use PowerShell 7.4+ and Microsoft.Graph.Authentication 2.37.0+. Certificate execution additionally requires Windows and Az.Accounts 5.0.0+. The certificate and its private key must be accessible in CurrentUser\My under the Windows identity running the report. Local administrator rights are not required by the collector.

ResourceApplication read permissionsPurpose
Microsoft GraphDeviceManagementManagedDevices.Read.All
DeviceManagementConfiguration.Read.All
Managed-device metadata and compliance policy states
WindowsDefenderATPMachine.Read.All
Vulnerability.Read.All
Matching machine, CVE/software findings and vulnerability context

Application registration, certificate upload and admin consent are separate approved setup steps. The report does none of them. These application permissions allow reads across the tenant: selecting one device limits the collector's work, not the application's authorization.

First run: prepare the application and certificate
  1. In Entra App registrations, register a dedicated application for accounts in your directory only, with no redirect URI.
  2. Add exactly the four Application permissions in the table above. Remove an unused default delegated User.Read entry if present.
  3. Have an authorized administrator grant consent and confirm that all four permissions show Granted.
  4. Obtain an authentication certificate through your organization's process and upload only its public .cer file under Certificates & secrets → Certificates. Keep the matching private key in CurrentUser\My under the Windows identity that will run the report. This runner uses no client secret.
  5. Copy the Directory (tenant) ID, Application (client) ID and certificate thumbprint into your private configuration. Add the Intune managed-device IDs as a JSON array.

The package's operation guide includes the setup checklist and Microsoft's application and certificate instructions. These are separate administrative setup steps; the collector remains read-only.

For an interactive pilot, the Graph scopes use the same names; Defender delegated scopes are Machine.Read and Vulnerability.Read, subject to user and device-group visibility. Defender for Business includes core vulnerability-management capabilities, but validate your own licensing and API access. This test uses no advanced hunting.

3. Run the report

Download and extract the package, inspect the scripts, and check its SHA-256 manifest. The author credit is not an Authenticode signature. Keep configuration, reports and certificates in private storage outside any repository.

Open PowerShell 7 in the extracted folder containing Get-EndpointSecurityReport.ps1. The ./ paths below refer to that folder. Replace this example with your actual extraction path:

Set-Location -LiteralPath 'C:\Tools\intune-defender-weekly-report'

Start with an Intune-only check

Install the Microsoft modules from the PowerShell Gallery if they are not already available. Then connect to the expected tenant and use a new output directory for each run.

Install-Module Microsoft.Graph.Authentication -Scope CurrentUser -MinimumVersion 2.37.0
Connect-MgGraph -TenantId '<tenant-guid>' -ContextScope Process -NoWelcome -Scopes 'DeviceManagementManagedDevices.Read.All','DeviceManagementConfiguration.Read.All'
./Get-EndpointSecurityReport.ps1 -ExpectedTenantId '<tenant-guid>' -ManagedDeviceId '<intune-managed-device-guid>' -IntuneOnly -OutputPath './Reports/Pilot-01'
Disconnect-MgGraph

This deliberately produces PARTIAL coverage because Defender was not queried. Check device identity, compliance and source timestamps before expanding the collection.

Include Defender using the approved certificate

Install Az.Accounts if needed. Copy config.example.json to a private folder and replace the tenant ID, application ID, certificate thumbprint and managed-device IDs. Keep the ID list as a JSON array. The operation guide explains certificate preflight, authentication stages and failure handling.

Install-Module Az.Accounts -Scope CurrentUser -MinimumVersion 5.0.0
pwsh -NoProfile -File ./Invoke-WeeklyEndpointReport.ps1 -ConfigurationPath 'C:\PrivateReports\endpoint-config.json' -OutputRoot 'C:\PrivateReports\Runs'

The runner uses the certificate for Graph and obtains a separate in-memory Defender token. No token belongs in JSON, command history, screenshots or a GitHub issue. Run it in a dedicated PowerShell process so its session cleanup does not interfere with unrelated administrative work.

Open the generated report.html. Review its coverage summary first, then check the device and action tables. COMPLETE means the stated reads and coverage checks passed; it is not a clean-security verdict.

FileUse it for
devices.csvIdentity matching, compliance, encryption metadata, freshness, risk and exposure
vulnerabilities.csvIndividual CVE/software/version rows, severity, exploit indicators and returned fixing KB
compliance.csvReturned policy and setting states
actions.csvGrouped follow-up actions with an initially Unassigned team field
coverage.csvCompleted, failed or unattempted queries
changes.csvDifferences from the explicitly selected previous snapshot
snapshot.jsonA private baseline for the next comparison

4. Check the real tenant results

The lab device was TSC-147. Its Intune policies reported Compliant, including the baseline checks for BitLocker, Code Integrity, Secure Boot and storage encryption. The API returned six policy-state records that represented three identical policy summaries twice; the report preserves that with ReportedInstances = 2. It is a returned-record count, not evidence of two assignments.

Real Intune policy results for TSC-147 showing three Compliant policies; account email values masked
Figure 1. Intune policy results captured during the pilot. The certificate run also returned Compliant. Setting-level checks were observed separately in the portal; the API returned policy summaries only.

After the one-device onboarding described below, Defender matched the exact Entra device ID and reported Active, Onboarded, risk None and exposure Medium. At 14:35 UTC, the first populated API collection returned the same 640 distinct CVEs shown by the portal. A second collection using corrected candidate rc.4 at 14:41 UTC on 17 November 2026 returned the same totals.

Real Defender Discovered vulnerabilities view for TSC-147 showing 640 items and an Active sensor
Figure 2. The real Defender list now contains 640 items. This is a portal capture, not the synthetic demo. Open the full-size image for the table context.
MeasureObserved resultHow to interpret it
Distinct CVEs640Matches the Defender portal total
CVE/software/version rows715A CVE can affect more than one product or version
Critical findings15 rows, 13 distinct CVEsRow and unique-CVE counts answer different questions
Software action groups6Grouped by device, vendor, product and version
Collection coverage5 completed sections, 0 incompleteBoth Intune and Defender reads completed
Real rc.4 certificate report at 14:41 UTC: one device with current coverage, 715 CVE/software rows and no incomplete collection sections
Figure 3. Unmodified summary from the real rc.4 run, cropped above the private inventory tables. Complete collection is not a declaration that the device is secure.

We compared selected records as well as totals. For example, CVE-2026-111497 appeared for Windows 11 version 10.0.26200.9911 with Critical severity and CVSS 9.2 in both the portal and the report. CVE-2026-88218 and CVE-2026-119958 matched Critical severity and CVSS 9.8. This is a sampled comparison, not a manual audit of every row.

Why the first runs had no vulnerability data

Initially, the tenant connector was enabled but the pilot was not onboarded. A local check found Sense stopped and no OnboardingState registry value. An enabled connector alone does not prove that a device is sending Defender telemetry.

We separately approved an EDR policy with Auto from connector, assigned only to a static group containing TSC-147 and no users. Its assignment and exact membership were independently verified. After synchronization, Intune showed Succeeded: 1 and Defender reported the pilot Active and Onboarded. The collector did not create that policy.

Real Intune EDR onboarding policy showing one successful device and zero errors or conflicts
One-device onboarding result. The approved policy scope remained limited to the pilot.

At 14:01 UTC, the APIs still returned no CVE/software rows and the portal showed No data available, even though exposure had become Medium. The report correctly required assessment review. Populated findings were observed later; we do not infer a universal availability deadline from that delay.

For a similar case, check the exact device identity, onboarding, sensor health, connectivity and assessment availability. A missing registry value needs investigation; it is not a measured state of zero. Do not install vulnerable software to manufacture a test result.

5. Build the team's action list

Start with missing coverage and stale data. Then work through Critical findings, High findings with a reported exploit indicator and devices reporting High risk. The software queue groups related findings so the team can investigate a product/version once instead of receiving a separate task for every CVE.

PriorityMeaning in this tool
UrgentReviewCritical severity, High severity with a reported exploit indicator, or a separate High device-risk action
HighHigh severity, or a separate action for encryption reported as false
ReviewUnknownSeverityMissing or unrecognized severity needs confirmation; it must not become routine simply because a value is absent
RoutineReviewKnown Medium or Low findings without a higher-priority finding in the software group

If unknown severity shares a group with High or Critical findings, the higher urgency stays in place and the action still explicitly asks the administrator to confirm the unknown severity. Candidate rc.4 fixes the earlier inconsistency between the detailed finding and its grouped action. The local regression tests cover missing values, unrecognized values and mixed-priority groups.

The team field starts as Unassigned. Agree ownership in the team's workflow; the device's primary user is not automatically responsible for patching it. A fixing KB is a value returned by the API, not a verified deployment instruction. Check vendor applicability, dependencies and the supported update path before acting.

These priorities are local triage rules. They do not alter Microsoft's severity, establish exploitation or impose a Microsoft response deadline. The interactive demo uses labelled synthetic fixtures so readers can explore the layout without receiving the tenant's inventory.

6. Compare snapshots carefully

On the next certificate run, pass the previous report's private snapshot explicitly:

pwsh -NoProfile -File ./Invoke-WeeklyEndpointReport.ps1 -ConfigurationPath 'C:\PrivateReports\endpoint-config.json' -OutputRoot 'C:\PrivateReports\Runs' -PreviousSnapshot 'C:\PrivateReports\Runs\<previous-run>\snapshot.json'

The tenant, device scope and schema must match, and the previous collection must be older. The runner does not guess which file should be your baseline.

  • StillObserved: the row exists in both snapshots.
  • NewlyObserved: it is present now after an earlier assessment that passed the tool's coverage checks.
  • FirstObservedAfterGap: it is present now, but the earlier coverage was insufficient.
  • NoLongerObserved: it is absent from a nonempty current assessment that passes the source, exposure and telemetry checks.
  • PendingVerification: it is absent while the new assessment is incomplete, stale or entirely empty.

Comparing the real 14:01 gap with the populated 14:35 collection produced 715 FirstObservedAfterGap rows. It did not mean 715 vulnerabilities had just been introduced. Comparing collections minutes apart also does not demonstrate a weekly trend.

Keep empty results honest. This candidate cannot distinguish a genuinely zero-finding device from an unpopulated feed using empty vulnerability responses alone. With otherwise healthy telemetry, it uses CollectedEmptyNeedsReview, leaves device counts blank and keeps earlier missing findings pending verification. There is no manual-completion override. Nonempty findings remain visible even when another coverage check fails.

NoLongerObserved is not proof that a patch fixed a finding. Software removal, version changes and assessment changes can all alter the result. Confirm the actual change before closing the team's task.

7. Prepare weekly operation

The runner creates one dated report per invocation. Before adding a schedule, test it under the intended execution identity, plan certificate renewal and agree report storage, retention, recipients and response ownership.

Monitor all three exit codes: 0 means the stated collection and coverage checks passed; 2 means a report was produced with partial coverage; 1 means the run failed. Exit code 2 can occur with zero failed API sections when the device assessment still needs review.

Start with a small device list. The collector accepts up to 500 explicit IDs, but that is an input limit, not validated throughput. Per-device API calls can hit service rate limits. A 429 stops further requests to that source; this candidate does not implement a fleet-wide batching service or renew an expired supplied Defender token mid-run.

The application authentication, single-device collection and coverage recovery were tested here. A genuine weekly comparison, unattended scheduling and message delivery remain separate operational validation steps. No schedule or email component was enabled. For later delivery, use a concise summary and an access-controlled report link rather than sending detailed inventories widely.

8. Review what has been validated

CheckEvidenceStatus
Read-only collectionGET-only data calls; no remediation, consent or mail-send operationReviewed
Regression behavior97 local checks, including unknown-severity action grouping and conservative empty-result handlingPassed with synthetic fixtures
Intune readsOne Compliant device; six returned records folded into three policy summariesValidated for returned fields; setting detail not returned
Defender correlation and findingsExact Entra device-ID match; 640 distinct CVEs, 715 software rows; portal total and three selected CVEs comparedLive pilot validated
Certificate executionrc.4 run at 14:41 UTC on 17 November; all five collection sections completeValidated on one device
Recovery from missing coverage715 FirstObservedAfterGap rows when comparing saved real collectionsValidated for this transition
Weekly production operationNo seven-day comparison, schedule or email delivery demonstratedStill to validate in the deployment environment

The application remains registered with the same four read permissions. Temporary authentication certificates, detailed tenant reports and private validation helpers are outside the download. The public GitHub preview contains the collector, runner, documentation, tests and checksums. The offline test workflow passed on Windows and Ubuntu.

The report reads CVE/software findings, not a complete installed-software inventory. Microsoft's separate inventory API requires Software.Read.All, which is outside the current four-permission design. It also does not perform a local vulnerability scan, retrieve recovery secrets or certify regulatory compliance.

Keep building your audit toolkit: pair endpoint evidence with the Entra MFA readiness audit, or use the Intune Admin Lab to work through device and policy troubleshooting cases.

Microsoft references

Reviewed against Microsoft documentation on 17 November 2026. The 48-hour threshold, action priorities and empty-response review rule are this tool's design decisions.