How to Export Microsoft Defender XDR Hunting Results as JSON

· Original article ↗

Summary

A tutorial shows how to export Defender XDR Advanced Hunting results as JSONL through Microsoft Graph, with required permissions, query limits, retention caveats, and troubleshooting tips.

Key points

  • Use Microsoft Graph’s runHuntingQuery endpoint with the ThreatHunting.Read.All permission and a Defender role that allows Advanced Hunting.
  • The example query retrieves process-event data for a selected device and date range, then writes each result as a JSON object per line.
  • Queries may time out or hit result caps; narrowing the time window or device set can help.
  • Advanced Hunting retains 30 days of data; older history must come from Sentinel or another configured streaming destination.
  • The article notes that Defender device names may be fully qualified, so startswith can work better than an exact match.

Article Details

Topic
Exporting Microsoft Defender XDR Advanced Hunting results through Microsoft Graph for review in LogTotal

Vendors

Products

Related Articles