detection-authoring

Deploy and manage Microsoft Defender XDR detection rules via Graph API.

2|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/msandbu/sentinelday --skill detection-authoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detection-authoring
Source: https://github.com/msandbu/sentinelday/tree/main/.github/skills/detection-authoring
Command: npx skills add https://github.com/msandbu/sentinelday --skill detection-authoring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.Graph.Authentication, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation and management of custom detection rules within Microsoft Defender XDR, streamlining the process of enhancing your security posture with tailored threat detection.

Core Features & Use Cases

  • Rule Deployment: Create new custom detection rules directly in Defender XDR using PowerShell and the Graph API.
  • Batch Processing: Deploy multiple rules efficiently from a JSON manifest file.
  • Lifecycle Management: Supports listing, enabling, disabling, and deleting existing rules.
  • Query Adaptation: Provides guidance and tools to convert Sentinel KQL queries into the required format for custom detections.
  • Use Case: A security analyst needs to deploy 10 new detection rules based on recent threat intelligence. Instead of manually configuring each rule in the portal, they use this Skill to deploy all 10 rules from a manifest file in minutes.

Quick Start

Use the detection-authoring skill to deploy custom detection rules from the file '.\temp\new_detections.json'.

Frequently Asked Questions about detection-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate the deployment of custom detection rules in Defender XDR?

You can automate deploying custom detection rules in Defender XDR by using PowerShell with the Microsoft Graph API to create rules or batch deploy them from a JSON manifest file. This streamlines threat detection management without manual portal configuration.

Can I convert Sentinel KQL queries for use as custom detections in Defender XDR?

Yes, you can convert Sentinel KQL queries for Defender XDR custom detections. The skill provides specific guidance and tools to adapt your existing KQL query syntax into the required format for Defender XDR rule creation.

Do I need Microsoft Graph PowerShell modules to manage Defender XDR detection rules?

Yes, you need the Microsoft Graph PowerShell modules and appropriate API scopes to manage Defender XDR detection rules. These dependencies are required to authenticate and interact with your tenant for rule creation and lifecycle operations.

What is the best way to batch deploy multiple threat intelligence detections to Microsoft Defender?

The best way to batch deploy detections to Microsoft Defender is by defining your rules in a JSON manifest file. This allows you to deploy multiple threat intelligence rules efficiently in minutes instead of configuring each one manually.

How do I manage the lifecycle of custom detection rules in Defender XDR?

You manage the lifecycle of custom detection rules in Defender XDR by using the Graph API to list, enable, disable, and delete existing rules. This automates security monitoring and ensures your threat detections remain current.