Share via

Vulnerability Reporting Export CSV

Soam prakash reddy Patnala 0 Reputation points
2026-06-09T04:50:05.9533333+00:00

Please provide/guide on extraction of a complete CSV tenant report containing all machine names paired with their active software vulnerabilities (CVE IDs).

Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud

1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-09T04:50:19.1966667+00:00

    To export a complete tenant-level list of all devices and their active software vulnerabilities (CVE IDs), use Microsoft Defender Vulnerability Management / Defender for Endpoint assessment export APIs rather than the Defender for Cloud CSV export, which is limited and focused on alerts/recommendations.

    There are two main API approaches, depending on organization size and data volume.

    1. Full software vulnerabilities assessment – JSON (small/medium tenants)

    This method returns all known vulnerabilities per device as paginated JSON, with one record per unique combination of:

    • DeviceId
    • SoftwareVendor
    • SoftwareName
    • SoftwareVersion
    • CveId

    Key properties include:

    • CveId – CVE identifier
    • DeviceId – device unique ID
    • DeviceName – FQDN of the device
    • CvssScore, ExploitabilityLevel, VulnerabilitySeverityLevel
    • DiskPaths, RegistryPaths
    • RecommendedSecurityUpdate / RecommendedSecurityUpdateId

    Process to build a CSV:

    1. Call the “Export software vulnerabilities assessment (JSON response)” API.
    2. Follow @odata.nextLink to page through all results.
    3. From each record, extract at least DeviceName and CveId (and any other desired fields).
    4. Flatten the JSON into a tabular structure and write to CSV (for example, using a script in PowerShell, Python, or similar).

    This method is recommended for organizations with fewer than ~100K devices.

    1. Full software vulnerabilities assessment – via files (large tenants)

    For larger environments or when faster, bulk export is needed, use the file-based export:

    • API: GET /api/machines/SoftwareVulnerabilitiesExport
    • Permissions required (app or delegated):
      • Application: Vulnerability.Read.All
      • Delegated: Vulnerability.Read
    • Parameters:
      • sasValidHours – number of hours the download URLs remain valid (max 6 hours).

    The response contains:

    • Export files – array of download URLs to GZIP-compressed, multiline JSON files
    • GeneratedTime – snapshot generation time

    Process to build a CSV:

    1. Call GET /api/machines/SoftwareVulnerabilitiesExport with appropriate permissions.
    2. From the response, collect all URLs in the Export files array.
    3. Download each file (they are GZIP compressed, multiline JSON).
    4. Decompress and parse each JSON line as a record. Each record represents a unique combination of DeviceId, SoftwareVendor, SoftwareName, SoftwareVersion, CveId.
    5. Extract fields such as DeviceName and CveId, plus any others needed (CvssScore, ExploitabilityLevel, etc.).
    6. Combine all records into a single dataset and export to CSV.

    This method is recommended for organizations with more than ~100K devices and is optimized for large data volumes.

    1. Delta export (optional, for ongoing reporting)

    After an initial full export, use the delta export API to maintain an up-to-date CSV without re-pulling the entire dataset:

    • Delta export returns entries with:
      • DeviceId, DeviceName, SoftwareVendor, SoftwareName, SoftwareVersion, CveId
      • EventTimestamp, FirstSeenTimestamp, LastSeenTimestamp
      • Status (New, Fixed, Updated)
      • VulnerabilitySeverityLevel, ExploitabilityLevel
      • RecommendedSecurityUpdate / RecommendedSecurityUpdateId

    Use this to:

    • Track new vulnerabilities (Status = New)
    • Track remediated vulnerabilities (Status = Fixed)
    • Update existing rows when Status = Updated
    1. Defender for Cloud CSV exports (alerts/recommendations only)

    Defender for Cloud can export:

    • Alerts to CSV via Security alerts → Download CSV report
    • Recommendations to CSV via Recommendations → Download CSV report

    However:

    • These exports are limited by Azure Resource Graph to 25,000 rows.
    • They contain alerts and recommendations, not a full per-device CVE inventory.

    For a complete tenant-wide mapping of all devices to all active CVEs, use the Defender Vulnerability Management / Defender for Endpoint software vulnerabilities assessment export APIs as described above, then transform the JSON into CSV.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.