To export incidents and alerts in Microsoft Defender, use the Microsoft Graph security API to list the incidents and alerts that aren't resolved, then export each list to CSV. An incident groups related alerts from across the Defender products, so the incident list is the short one and the alert list holds the detail. The Defender portal's queues show only the last 7 days until you widen the time range.
| Method | Best fit |
|---|---|
| PowerShell | 2 CSV files of every incident and alert not yet resolved, with their owners and links. |
| Admin centre | Working the queue in the Defender portal, with a CSV of the incidents you've filtered. |
| Altivane | Recommended for recurring reviews, with open incidents by severity, age and owner. |
Before you start
Use an account with 1 of the roles Microsoft lists for reading incidents: Security Reader, Global Reader, Security Operator or Security Administrator. The PowerShell example requests SecurityIncident. and SecurityAlert.; your organisation may require administrator consent.
The lists are read live, within the time your Defender data is kept. The examples read and export; they don't change an incident's status, owner or classification.
Option 1
Export incidents and alerts with PowerShell
Install the modules once, then connect and export the incidents and alerts that aren't resolved. The filter runs in Microsoft Graph, so only those come back.
# Install once, if the modules are not already installed.
Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.Security -Scope CurrentUser$ErrorActionPreference = 'Stop'
Connect-MgGraph -Scopes 'SecurityIncident.Read.All', 'SecurityAlert.Read.All' -NoWelcome
try {
$filter = "status ne 'resolved'"
$incidents = @(Get-MgSecurityIncident -All -Filter $filter |
Select-Object Id, DisplayName, Severity, Status, AssignedTo, Classification,
CreatedDateTime, LastUpdateDateTime, IncidentWebUrl)
$alerts = @(Get-MgSecurityAlertV2 -All -Filter $filter |
Select-Object Id, Title, Severity, Status, ServiceSource, IncidentId, AssignedTo,
CreatedDateTime, AlertWebUrl)
if ($incidents.Count -eq 0 -and $alerts.Count -eq 0) {
Write-Output 'No incidents or alerts are open.'
} else {
$incidents | Sort-Object CreatedDateTime |
Export-Csv -Path './open-incidents.csv' -NoTypeInformation -Encoding utf8
$alerts | Sort-Object CreatedDateTime |
Export-Csv -Path './open-alerts.csv' -NoTypeInformation -Encoding utf8
Write-Output "$($incidents.Count) open incidents and $($alerts.Count) open alerts."
}
} finally {
Disconnect-MgGraph | Out-Null
}Both files list the oldest first, and each row keeps the link that opens it in the Defender portal. IncidentId on an alert ties it to its incident. Dates are in UTC. To include incidents resolved lately, filter on lastUpdateDateTime instead, such as lastUpdateDateTime ge 2026-10-01T00:00:00Z; Microsoft lists it among the properties that support $filter, with severity, status and assignedTo.
Option 2
Export incidents in the Defender portal
- Sign in to the Microsoft Defender portal for the correct tenant.
- Go to Incidents & alerts > Incidents.
- Choose the time range above the queue: it shows the last week until you choose another, up to Six months.
- Check the filters. By default the queue shows New and In progress incidents of High, Medium or Low severity; add or remove filters to change that.
- Select Export to save the filtered queue as a CSV file, up to 10,000 incidents.
- For the alerts, go to Incidents & alerts > Alerts, which also shows the new and in progress alerts of the last 7 days by default.
This suits the day's triage. The export follows whatever filters are on screen, so 2 people exporting can get different files; for the same list every time, use PowerShell or Altivane.
Option 3 ยท Recommended for recurring reviews
Report on incidents and alerts with Altivane
- Open Altivane and choose the tenant.
- Run the Incidents and Alerts report.
- Open the tenant's Excel workbook and find Open Incidents: each incident not yet resolved, the most severe and oldest first, with its severity, status, classification, who it's assigned to and its age in days.
- Read Open Alerts for the alerts not yet resolved, with the product that raised each and its incident.
Incidents and Alerts Summary counts the open incidents, the high severity ones, those nobody is assigned, the age of the oldest and the incidents resolved in the last 30 days, then the open alerts by the product that raised them. The Incidents and Alerts reports list every open item and those changed in the last 30 days.
Contact usCommon questions
Why does the portal show fewer incidents than the export?
The incident queue starts on the last week, with New and In progress incidents of High, Medium and Low severity. Informational incidents and older ones are there, but hidden until you change the time range and the filters. The PowerShell export keeps every incident that isn't resolved, whatever its age or severity.
Why does the script return an access error?
Check the role and the consent. The signed-in account needs 1 of the roles above, and the session needs consent for both permissions. A delegated call fails if the account has the permission but not the role.
How do I see the tenant's overall security position?
Incidents show what has happened; Secure Score shows how well the tenant is set up to stop it. See how to check Secure Score in Microsoft Defender.
Microsoft references
Technical references checked on 6 November 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.