Microsoft Defender XDR ListIncidents
Certified
List Microsoft Defender XDR incidents
Microsoft Defender XDR ListIncidents
List Microsoft Defender XDR incidents
Lists incidents from the Microsoft Graph security API (/security/incidents) in the order Microsoft Graph
returns them, following @odata.nextLink until top incidents are collected. Requires the Microsoft Graph
application permission SecurityIncident.Read.All.
type: io.kestra.plugin.microsoft365.defender.ListIncidentsExamples
List active high-severity incidents with their alerts
id: defender_list_incidents
namespace: company.security
tasks:
- id: list_incidents
type: io.kestra.plugin.microsoft365.defender.ListIncidents
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
severity: HIGH
status: ACTIVE
expandAlerts: true
top: 20
- id: log
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.list_incidents.incidents | jq('[.[].displayName]') | first }}"
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-microsoft365 --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150clientId string
Client ID
Client ID of the Azure service principal. If you don't have a service principal, refer to create a service principal with Azure CLI.
clientSecret string
Client Secret
Service principal client secret. Use this for Client Secret authentication. Provide clientId, tenantId, and clientSecret. Either clientSecret OR pemCertificate must be provided, not both.
expandAlerts booleanstring
falseInclude alerts
Expand the alerts of each incident ($expand=alerts). Default false.
fetchType string
FETCHSTOREFETCHFETCH_ONENONEHow to output the incidents
FETCH - outputs the incidents as incidents
FETCH_ONE - outputs the first incident as incident
STORE - stores the incidents in an ION file and outputs its uri
NONE - only outputs count
Default FETCH.
filter string
OData filter
Raw OData $filter expression, e.g. assignedTo eq 'soc@company.com'. Combined with severity and status using and.
pemCertificate string
PEM Certificate
Alternative authentication method using certificate-based authentication.
Use this for Client Certificate authentication. Provide clientId, tenantId, and pemCertificate.
Either clientSecret OR pemCertificate must be provided, not both.
severity string
INFORMATIONALLOWMEDIUMHIGHSeverity
Only return incidents with this severity. Allowed values: INFORMATIONAL, LOW, MEDIUM, HIGH.
status string
ACTIVEIN_PROGRESSRESOLVEDREDIRECTEDAWAITING_ACTIONStatus
Only return incidents with this status. Allowed values: ACTIVE, IN_PROGRESS, RESOLVED, REDIRECTED, AWAITING_ACTION.
tenantId string
Tenant ID
top integerstring
100Maximum number of incidents
Between 1 and 2000. Default 100.
Outputs
count integer
0Number of incidents retrieved
incident object
First incident (FETCH_ONE)
incidents array
Incidents (FETCH)
Incident objects with the Microsoft Graph field names.
uri string
uriURI of the ION file with the incidents (STORE)