opentide

Microsoft Defender for Endpoint (`platform::defender_for_endpoint::1.0`)

`configurations.defender_for_endpoint` is a Microsoft Defender custom detection rule. The detection text is KQL. Query validation is supported. Defender assigns the remote rule id; opentide stores it per tenant in [deployment state](/docs/specifications/specs/deployment-state/) so the next deploy updates that rule.

Shared fields are defined in platforms.

Requirements

  • Static validation MUST require query, alert, impacted_entities, and scheduling.
  • alert.category MUST be present. The other alert fields MAY be omitted.
  • impacted_entities MAY be an empty object. At least the object MUST be present.
  • scheduling MUST be one of NRT, 1H, 3H, 12H, 24H.
  • query MUST be non-blank KQL.
  • scope, actions, and exclusions MAY be omitted and still pass static validation.
  • The block MUST NOT contain rule_id, rule_id_bundle, or rule_id::<tenant>. Each fails external_id_in_rule (External rule ids).
  • Registry load MUST require scope. A block that validates without scope MUST NOT load for deploy.
  • actions.files.quarantine_files MAY be used as an alias of quarantine_file on the registry-load path.

Definition

Block

FieldTypeRequiredDefaultDescription
querystringyes—KQL. Multiline. Compiled with matching exclusions before deploy.
alertDefenderAlertyes—Custom detection alert template.
impacted_entitiesDefenderImpactedEntitiesyes—Columns that identify the impacted device, user, or mailbox.
schedulingstringyes—NRT, 1H, 3H, 12H, or 24H.
scopeDefenderGroupScopingoptionalnullDevice-group scope. Required by registry load. The current deployer does not send it.
actionsDefenderResponseActionsoptionalnullResponse actions run when the detection fires.
exclusionslist[DefenderExclusion]optionalnullPer-tenant KQL fragments appended to query.

scheduling: NRT is sent as period 0. The other values are sent unchanged.

alert (DefenderAlert)

FieldTypeRequiredDefaultDescription
categorystringyes—Defender alert category. Deploy removes spaces (Suspicious Activity is sent as SuspiciousActivity).
titlestringoptionalnullAlert title. Deploy uses the rule name when omitted.
descriptionstringoptionalnullAlert description. Deploy uses the rule description when omitted.
severitystringoptionalnullInformational, Low, Medium, High, or Critical. Deploy uses response.alert_severity when omitted. Critical is sent as high.
recommendationstringoptionalnullRecommended actions text.
techniqueslist[string]optionalnullAccepted on the block. The current deployer sends an empty technique list.

impacted_entities (DefenderImpactedEntities)

Each value is a result column. Deploy lowercases the first character (Defender expects a column reference such as deviceId). Omitted keys are not sent.

FieldTypeRequiredDescription
devicestringoptionalDevice column.
userstringoptionalUser column.
mailboxstringoptionalMailbox column.

scope (DefenderGroupScoping)

FieldTypeRequiredDescription
selectionstringyesAll or Specific.
device_groupslist[string]optionalGroup names. Used when selection is Specific.

actions (DefenderResponseActions)

Any of devices, files, and users MAY be omitted. An empty actions object deploys with no response actions.

actions.devices

FieldTypeRequiredDefaultDescription
isolate_devicestringoptionalnullIsolation type. Deploy lowercases the first character (Full is sent as full).
collect_investigation_packagebooleanoptionalfalseCollect an investigation package.
run_antivirus_scanbooleanoptionalfalseRun an antivirus scan.
initiate_investigationbooleanoptionalfalseStart an automated investigation.
restrict_app_executionbooleanoptionalfalseRestrict app execution.

actions.files

FieldTypeRequiredDescription
allow_blockAllowBlockoptionalAllow or block a file identifier.
quarantine_filestringoptionalColumn identifying the file to quarantine. Loader alias: quarantine_files.

actions.files.allow_block:

FieldTypeRequiredDescription
actionstringyesAllow or Block.
identifierstringyesColumn identifying the file. Deploy lowercases the first character.
groupsGroupScopingoptionalDevice groups the allow or block applies to.

actions.files.allow_block.groups:

FieldTypeRequiredDefaultDescription
selectionstringyes—All or Specific.
device_groupslist[string]optionalnullGroup names. Sent when selection is Specific.

actions.users

Each value is a column. Deploy lowercases the first character. Omitted keys are not sent.

FieldTypeRequiredDescription
mark_as_compromisedstringoptionalUser column.
disable_userstringoptionalUser column.
force_password_resetstringoptionalUser column.

exclusions[] (DefenderExclusion)

Same shape and tenant matching as Sentinel exclusions. See sentinel-1.0.md.

FieldTypeRequiredDefaultDescription
querystringyes—KQL fragment appended after the base query. The key is required. An empty string is accepted.
reasonstringyes—Why the exclusion exists. Not sent to Defender.
tenantstringoptionalnullLimit the exclusion to one tenant name.
letmap[string, scalar]optionalnullKQL let bindings. String, number, or boolean.

Deploy

Block status strategyDefender result
DISABLEMENTUpdate the bound remote rule with isEnabled: false; without a binding, report external_id_missing and make no HTTP call.
DELETIONDelete the bound remote rule and remove the binding after successful deletion; without a binding, report external_id_missing.
any otherUpdate when a binding exists; otherwise create and durably record the returned id.

The binding is the tenant's entry under defender_for_endpoint in .opentide/states/deployment/<uuid>.json. A create is refused when the shard directory is gitignored or the run cannot persist state, and the rule file is never written. The decision order and codes are in deployment-state.md.

The display name on the Defender rule is the Tide rule name.

Relationships

Defaults & overrides

FieldDefault
alert.titlerule name at deploy
alert.descriptionrule description at deploy
alert.severityresponse.alert_severity at deploy
Device action flagsfalse
scheduling: NRTsent as period 0

Examples

configurations:
  defender_for_endpoint:
    enabled: true
    schema: platform::defender_for_endpoint::1.0
    status: STAGING
    query: |
      DeviceProcessEvents
      | where FileName =~ "cmd.exe"
      | take 1
    scheduling: 1H
    alert:
      category: Execution
      title: Suspicious command processor
      severity: High
    impacted_entities:
      device: DeviceId
      user: AccountName
    scope:
      selection: All
    actions:
      devices:
        isolate_device: Full
        collect_investigation_package: true

Fixture: fixtures/platforms/defender-for-endpoint.yaml.

History

VersionDateNotes
1.02026-09-30Initial field contract from the Defender configuration model, loader, and deployer.
1.12026-10-16rule_id and the rule_id::<tenant> alias are removed and fail external_id_in_rule. Deploy reads and writes the Defender id in deployment state; DISABLEMENT and DELETION without a binding report external_id_missing (RFC 0010). Schema id unchanged.

On this page