How suchandanreddy/microsoft-sentinel-labs works
This repository is a documentation-driven lab pack for building a Microsoft Sentinel-based security investigation workflow, not an application codebase. Its architecture is a staged path from data lake setup, to data preparation, to agentic querying, to packaging/publishing a reusable security agent.
1. Primary purpose
- The repo teaches how to use Microsoft Sentinel Data Lake as the analytics backend for a security investigation scenario called IdentityDrift.
- The end goal is an agent that can decide whether a suspicious sign-in is benign or an initial access event requiring containment.
2. Top-level lab flow
- The six markdown labs form a pipeline:
- onboard Sentinel Data Lake
- create KQL jobs and sample tables
- connect Sentinel tools to VS Code via MCP
- build an agent in Azure AI Foundry
- build the same class of agent in Security Copilot
- package and publish the agent to the Security Store
- This is a layered architecture: data platform first, tooling next, then agent orchestration, then distribution.
3. Data foundation subsystem
- Lab 1 establishes the Microsoft Sentinel Data Lake in the Defender/Azure portals.
- This is the core persistence and query layer for the rest of the repo.
- It is the boundary where raw security telemetry becomes queryable investigation data.
4. KQL job subsystem
- The KQL-Jobs/ folder contains reusable job definitions organized by telemetry type:
- CommonSecurity_ID_Logs
- SigninLogs
- AADRiskyUsers
- DeviceProcessEvents
- SecurityAlerts
- These represent the lab’s data transformation layer, where fictional IdentityDrift telemetry and supporting security signals are ingested or shaped into Sentinel tables.
5. Security signal model
- The scenario correlates multiple signal classes rather than relying on a single source:
- identity access telemetry from IdentityDrift
- Entra ID sign-in events
- AAD risk detections
- endpoint process execution
- cloud/security alerts
- The architecture is centered on cross-domain correlation: identity, access, endpoint, and cloud workload telemetry.
6. Tooling boundary: MCP
- Lab 3 introduces a Sentinel MCP server connection for VS Code.
- This is the integration boundary between the Sentinel data plane and AI-assisted tooling.
- MCP acts as the tool interface the agent can use to run investigations against Sentinel data.
7. Agent runtime in Azure AI Foundry
- Lab 4 builds an agent in Azure AI Foundry that uses Sentinel data sources through MCP.
- This agent layer is where query orchestration and investigation logic live.
- Its job is to sequence queries across the Sentinel tables, combine evidence, and produce a risk assessment.
8. Agent runtime in Security Copilot
- Lab 5 recreates the investigation agent inside Security Copilot.
- The architectural difference is the hosting/runtime context: the same investigative workflow is adapted to Copilot’s workspace and SCU-based execution model.
- This lab emphasizes operational deployment of the agent inside Microsoft’s security operations environment.
9. Publishing boundary
- Lab 6 packages the agent for distribution through the Microsoft Security Store via Partner Center.
- This turns the lab output into a publishable product artifact, with a manifest and deployment package.
- It is the handoff from internal lab solution to external marketplace delivery.
10. Cross-cutting scenario and outcome
- The scenario starts with a suspicious user sign-in and expands into a multi-stage investigation:
- location anomaly
- MFA challenge
- privileged Kubernetes access
- role escalation
- suspicious kubectl execution
- The agent’s purpose is to synthesize these signals into a clear decision for security response.
11. Relevant external services
- The repo depends on Microsoft portals and services that define the boundaries of each lab:
- Defender portal for Sentinel onboarding
- Azure portal for resource and data lake setup
- VS Code for MCP integration
- Azure AI Foundry for agent creation
- Security Copilot for operational agenting
- Partner Center / Security Store for publishing
12. How to diagram it
- A good architecture diagram would show:
- source telemetry feeding Sentinel Data Lake
- KQL jobs transforming raw data into investigation tables
- MCP exposing query access to AI tools
- agents in Foundry/Copilot orchestrating multi-table correlation
- a final packaging/publishing path to Security Store
- The central data dependency is Sentinel Data Lake; the central intelligence layer is the agent.
Main entry points: 02-Create-KQL-Jobs.md KQL Jobs · 01-Sentinel-DataLake-Onboarding.md Data Lake · 04-Building-an-Agent-in-Azure-AI-Foundry.md Foundry Agent · 05-Building-an-Agent-in-Security-Copilot.md Copilot Agent
Components 22
Lab flow
Documentation-driven stages from data foundation to publishing
- README · Repository overview and lab map
README.md - Data Lake · Onboard Microsoft Sentinel Data Lake
01-Sentinel-DataLake-Onboarding.md - KQL Jobs · Create query jobs and sample tables
02-Create-KQL-Jobs.md - MCP Setup · Connect Sentinel tools to VS Code through MCP
03-Sentinel-MCP-VSCode-Setup.md - Foundry Agent · Build the investigation agent in Azure AI Foundry
04-Building-an-Agent-in-Azure-AI-Foundry.md - Copilot Agent · Recreate the agent in Security Copilot
05-Building-an-Agent-in-Security-Copilot.md - Publish Store · Package and publish the agent to Security Store
06-Publishing-Agent-to-Security-Store.md
KQL jobs
Reusable Sentinel job sets by telemetry source
- Common logs · Shared security identity log shaping
KQL-Jobs/CommonSecurity_ID_Logs - Signin logs · Entra sign-in telemetry jobs
KQL-Jobs/SigninLogs - Risky users · AAD risk detection jobs
KQL-Jobs/AADRiskyUsers - Device events · Endpoint process execution jobs
KQL-Jobs/DeviceProcessEvents - Security alerts · Cloud and security alert jobs
KQL-Jobs/SecurityAlerts
External platforms
Microsoft services used across the labs
- Sentinel Lake · Core security analytics and query backend
- Defender Portal · Sentinel onboarding surface
- Azure Portal · Resource and data lake setup surface
- VS Code · Local MCP-connected investigation workspace
- AI Foundry · Agent authoring and orchestration runtime
- Security Copilot · Operational security agent runtime
- Partner Center · Packaging and marketplace publishing surface
- Security Store · Distribution target for the packaged agent
IdentityDrift
Security investigation scenario and signal model
- IdentityDrift · Suspicious sign-in investigation scenario
- Signal model · Identity, endpoint, risk, and alert signals
Connections 27
- README → Data Lake: starts with · Repository guide points to the lab sequence
- Data Lake → Sentinel Lake: establishes · Creates the Sentinel Data Lake foundation
- Data Lake → Defender Portal: uses · Onboarding is performed through Defender portal
- Data Lake → Azure Portal: uses · Data lake resources are configured in Azure portal
- KQL Jobs → Common logs: builds · Creates reusable query jobs and tables
- KQL Jobs → Signin logs: builds · Creates sign-in telemetry jobs
- KQL Jobs → Risky users: builds · Creates risk telemetry jobs
- KQL Jobs → Device events: builds · Creates endpoint telemetry jobs
- KQL Jobs → Security alerts: builds · Creates alert telemetry jobs
- Common logs → Sentinel Lake: loads · Shapes data into Sentinel queryable state
- Signin logs → Sentinel Lake: loads · Feeds sign-in evidence into the lake
- Risky users → Sentinel Lake: loads · Feeds risk detections into the lake
- Device events → Sentinel Lake: loads · Feeds endpoint execution evidence into the lake
- Security alerts → Sentinel Lake: loads · Feeds alert evidence into the lake
- MCP Setup → VS Code: connects · Sets up MCP-based investigation tooling
- MCP Setup → Sentinel Lake: exposes · MCP bridges tool access to Sentinel data
- Foundry Agent → AI Foundry: builds in · Agent is authored in Azure AI Foundry
- Foundry Agent → Sentinel Lake: queries · Agent uses Sentinel data for investigations
- Foundry Agent → Signal model: correlates · Combines cross-domain evidence into a risk judgment
- Copilot Agent → Security Copilot: deploys in · Same investigative pattern is hosted in Security Copilot
- Copilot Agent → Sentinel Lake: queries · Copilot agent investigates against Sentinel data
- Copilot Agent → Signal model: correlates · Uses the same signal model for assessment
- Publish Store → Partner Center: packages · Creates the distributable agent artifact
- Partner Center → Security Store: publishes to · Submits the agent to Security Store
- IdentityDrift → Signal model: defines · Scenario centers on suspicious sign-in and follow-on evidence
- Signal model → AI Foundry: informs · Foundry agent uses the signal set for reasoning
- Signal model → Security Copilot: informs · Copilot agent uses the same signal set for reasoning