Sentinel MCP Natural-Language Hunting Digest
On a schedule, the flow asks the Sentinel MCP (Preview) a set of natural-language hunting questions (e.g. unusual sign-ins, new admin grants), translates them to KQL via the MCP, summarizes findings, and posts a daily threat-hunting digest to Teams with links to drill in. Turns hunting hypotheses into an automated daily readout.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow turns recurring threat-hunting hypotheses into an automated daily readout. On a daily schedule it opens a session with the Microsoft Sentinel MCP (Preview) server, asks it a configurable set of natural-language hunting questions (unusual sign-ins, new admin/role grants, password-spray patterns, rare process executions), lets the MCP translate each one to KQL and run it against the workspace, collects the findings into an HTML digest, and delivers that digest to a Microsoft Teams channel and an email inbox.
Why it matters: Running the same hunts by hand every day is slow and inconsistent. Natural-language-to-KQL via the Sentinel MCP makes a repeatable daily hunt cheap to operate, and the digest gives analysts and leadership a single morning readout with a consistent question set.
Status: Built and verified (Flow Checker 0 errors / 0 warnings). Ships Off - going live requires only authorizing the three connections and setting the six environment-variable values.
Use Case
A SOC or IT-security team wants a recurring, low-effort threat-hunting digest grounded in their own Microsoft Sentinel data, without an analyst hand-writing and running KQL each morning. Audience: IT Admins (operational hunt results) and Executives (daily posture readout).
Flow Architecture
Recurrence
Recurrence (Day / 1, 07:00 Eastern)Daily hunt cadence
Initialize variables
Initialize variableHunting questions array, workspace id, MCP tool name, Teams group/channel ids, recipient email, protocol version, session id, digest rows accumulator
Initialize Mcp Session
Sentinel MCP invokemcpdataexplorationJSON-RPC initialize handshake to open an MCP session; captures Mcp-Session-Id
Apply to each Hunting Question
Foreach (sequential)Per NL question: tools/call to translate to KQL, run, and append findings to the digest
Compose Digest Html
ComposeBuilds the final HTML digest (heading + table)
Post Digest To Teams
Teams PostMessageToConversationPosts the digest to the SOC Teams channel
Send Digest Email
Outlook SendEmailV2Emails a copy of the digest
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SentinelMcpHuntingQuestions | String | JSON array of 4 sample hunts | The natural-language questions asked each run |
| flowlibs_SentinelMcpToolName | String | run_hunting_query | The MCP data-exploration tool invoked per question |
| flowlibs_SentinelWorkspaceId | String | <configure> | The Sentinel / Log Analytics workspace to hunt in |
| flowlibs_TeamsGroupId | String | <your-team-id> | Target Teams team (group) |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Target Teams channel |
| flowlibs_DigestRecipientEmail | String | you@yourcompany.com | Recipient for the emailed digest |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Sentinel MCP (Preview) | shared_sentinelmcp | invokemcpdataexploration |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Tune the hunt set
- Edit flowlibs_SentinelMcpHuntingQuestions (a JSON array) to add/remove natural-language hunts. No flow-logic change needed.
- Change cadence
- Edit the Recurrence trigger (frequency / hour / time zone).
- Point at your workspace
- Set flowlibs_SentinelWorkspaceId; set flowlibs_SentinelMcpToolName to the exact MCP tool exposed in your tenant.
- Retarget delivery
- Set the Teams group/channel ids and the recipient email; remove the Teams or email action if you only want one channel.
- Threshold escalation
- Add a Condition after the loop to escalate (high-importance email, @mention) when findings exceed a count.
- Persist generated KQL
- Extend the loop to store the MCP-returned KQL as Sentinel analytics rules or in a Dataverse log table.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Parse hunt questions
Parses the JSON array of NL hunting questions
EXPR.02Capture MCP session id
Captures the session id from the handshake header
EXPR.03Current hunting question (in loop)
The NL question for the current loop iteration
EXPR.04Findings cell (with fallback)
Normalizes the per-question MCP result
EXPR.05Digest body reused for Teams + email
Single HTML body delivered to both channels
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.