Security Automation Engineering

Automate Security Response Without Losing Operational Control.

Build a triage playbook like anything else that acts on its own: specify it, scope its identities, keep its evidence honest, gate containment on an analyst's approval, verify every action and survive failure. Built in a local Logic Apps lab against Microsoft's security APIs.

What you'll be able to do

✓Write a Logic Apps Standard workflow that reads a Sentinel incident, refuses the wrong shape and reports what it could not do
✓Specify a playbook as cases that run, and change it only with the case that proves the change
✓Give each call its own identity and only the permissions it needs, with secrets kept out of the definition
✓Gather evidence through the query API, Microsoft Graph and Defender, and say exactly how complete it is
✓Contain a device or an account only on an analyst's matched approval, then follow the action and verify it
✓Package a tested deployment with Bicep and managed identities, and operate the playbook with alerts and a handover
SEC202 | Included with Premium, from $19.99/month | 12 modules and an orientation | 36–40 hours at your own pace | 40 CPE credits

Before you start

Prerequisites
None
Hands-on setup
A local lab: Visual Studio Code with the Logic Apps extension, Python and Node.js. The Lab Setup module walks you through it.
Optional
A Microsoft 365 tenant and an Azure subscription, for the deployment in Module 11

Course Syllabus

Every module and every lesson. The first three modules are open; the rest open on a click.

Download the full syllabus (PDF) Download the lab pack

Phase 1: Building the Workflow

Module 0Setup and First RunCourse Preview

What the course builds and how it is built, the tools and their versions, installing them with the lab pack, and your first workflow run in the local runtime against the harness.

Show 5 lessonsHide lessons
  1. 0.10.1 What This Course BuildsPreview
  2. 0.20.2 How the Course Is BuiltPreview
  3. 0.30.3 The Tools and Their VersionsPreview
  4. 0.40.4 Installing the Tools and the Lab PackPreview
  5. 0.50.5 Start Here: Your First RunPreview
Module 1Your First Security Playbook

Build a Logic Apps Standard security playbook and run it locally: read an incident safely, decide, look up devices in Defender, comment on the incident and fail with a record.

Show 8 lessonsHide lessons
  1. 1.11.1 The Incident Arrives
  2. 1.21.2 Reading the Incident
  3. 1.31.3 Deciding
  4. 1.41.4 Entities
  5. 1.51.5 Calling Out
  6. 1.61.6 Writing Back
  7. 1.71.7 When a Step Fails
  8. 1.81.8 Exercise: Your First Playbook
Module 3Identity and Secrets

Give a security playbook least-privilege identities: one token per API, a reader and a writer, a permission matrix run as tests, secrets out of run history and the repository, and a rotation with no failed run.

Show 8 lessonsHide lessons
  1. 3.13.1 Who the Playbook Is
  2. 3.23.2 Client Credentials, Step by Step
  3. 3.33.3 One Token per API
  4. 3.43.4 Separate Read and Write Identities
  5. 3.53.5 The Permission Matrix as Tests
  6. 3.63.6 Secrets Out of the Definition
  7. 3.73.7 Rotating a Secret
  8. 3.83.8 Exercise: Least Privilege

Phase 2: Evidence, APIs and Code

Module 4Querying Evidence

Add query evidence to a security playbook: the Log Analytics query API, saved functions with guarded parameters, a tested window, and a sentence for every way a query can fall short.

Show 8 lessonsHide lessons
  1. 4.14.1 The Evidence Question
  2. 4.24.2 Calling the Query API
  3. 4.34.3 A Saved Function with Parameters
  4. 4.44.4 The Window
  5. 4.54.5 Results That Report Completeness
  6. 4.64.6 Evidence in the Comment
  7. 4.74.7 When the Query Fails
  8. 4.84.8 Exercise: An Evidence Step
Module 5Calling the Security APIs

Call the Microsoft security APIs from a playbook: Graph alerts paged to the end, a shared child workflow with one vocabulary of failure, Defender rate limits, and an antivirus scan polled to its end.

Show 8 lessonsHide lessons
  1. 5.15.1 The Alerts Behind the Account
  2. 5.25.2 Paging Graph Results
  3. 5.35.3 A Child Workflow for API Calls
  4. 5.45.4 Throttling at the Rate Limit
  5. 5.55.5 An Asynchronous Machine Action
  6. 5.65.6 Polling with Until
  7. 5.75.7 Predictable Errors
  8. 5.85.8 Exercise: Alert Evidence
Module 6Enrichment and Evidence

Enrich the triage comment with the account, device, addresses and threat intelligence through saved workspace functions, audit the watchlists behind them, and keep a traceable evidence record of every fact.

Show 8 lessonsHide lessons
  1. 6.16.1 What Enrichment Is For
  2. 6.26.2 The Account
  3. 6.36.3 The Device
  4. 6.46.4 The Addresses
  5. 6.56.5 Watchlists as Data
  6. 6.66.6 Threat Intelligence
  7. 6.76.7 A Traceable Evidence Record
  8. 6.86.8 Exercise: Enrichment
Module 7Code in the Workflow

Put code where the workflow needs it: inline JavaScript, inline PowerShell, and a tested PowerShell Azure Function that reads Microsoft Graph with its own identity and answers the playbook in one contract.

Show 8 lessonsHide lessons
  1. 7.17.1 When the Workflow Needs Code
  2. 7.27.2 Inline JavaScript
  3. 7.37.3 Inline PowerShell
  4. 7.47.4 A PowerShell Azure Function
  5. 7.57.5 Calling Microsoft Graph from the Function
  6. 7.67.6 Calling the Function from the Playbook
  7. 7.77.7 Testing the Function
  8. 7.87.8 Exercise: A Graph Function for the Escalation Check

Phase 3: Approval and Response

Module 8Analyst Approval

Ask an analyst before acting: an approval record bound to one device and one action, sent through the HTTP Webhook action with an expiry, a decision that must match its request, and a recheck before anything is done.

Show 8 lessonsHide lessons
  1. 8.18.1 What an Approval Must Bind
  2. 8.28.2 The HTTP Webhook Action
  3. 8.38.3 The Request the Analyst Sees
  4. 8.48.4 Expiry
  5. 8.58.5 Three Answers
  6. 8.68.6 A Decision That Matches Its Request
  7. 8.78.7 Revalidate Before Acting
  8. 8.88.8 Exercise: Approval for Isolating NE-BENNETT-LT
Module 9Response and Verification

Act on an approval and verify it: isolate a device once, follow the machine action to its end, verify against the record, release with its own approval, disable an account through Graph, and package both as templates.

Show 8 lessonsHide lessons
  1. 9.19.1 Accepted Is Not Contained
  2. 9.29.2 Isolating the Device
  3. 9.39.3 Following the Machine Action
  4. 9.49.4 Verifying the Outcome
  5. 9.59.5 Release
  6. 9.69.6 Disabling an Account
  7. 9.79.7 The Containment Templates
  8. 9.89.8 Exercise: Contain NE-BENNETT-LT
Module 10Surviving Failure

Make the triage playbook safe to run twice: guard each action against earlier work, key comments so reruns update them, close the race between concurrent runs, handle malformed entities, and label a failed containment.

Show 8 lessonsHide lessons
  1. 10.110.1 Why the Same Incident Arrives Twice
  2. 10.210.2 An Idempotency Key
  3. 10.310.3 Comments That Update, Not Multiply
  4. 10.410.4 Two Runs at Once
  5. 10.510.5 A Malformed Entity
  6. 10.610.6 Failed Containment
  7. 10.710.7 Every Fault, Once
  8. 10.810.8 Exercise: Survive a Duplicate Trigger

Phase 4: Deployment and Operations

Module 11Deploying to a Tenant

Put the triage playbook into a tenant: managed identities, Bicep infrastructure, the Sentinel trigger, automation rules as code, a pipeline that checks before it deploys, and a rollback that switches the rules off first.

Show 8 lessonsHide lessons
  1. 11.111.1 What Changes in a Tenant
  2. 11.211.2 The Infrastructure in Bicep
  3. 11.311.3 The Sentinel Trigger
  4. 11.411.4 Identities and Roles
  5. 11.511.5 The Automation Rule
  6. 11.611.6 Shipping the Workflows
  7. 11.711.7 Versions and Rollback
  8. 11.811.8 Exercise: Deploy the Triage Playbook
Module 12Operating It, and Capstone

Keep the deployed playbook working: the health log, the run log, four alert rules, a cost model, retention and a generated handover; then the capstone, one incident through every stage in seven cases.

Show 8 lessonsHide lessons
  1. 12.112.1 What Operating Means
  2. 12.212.2 Inside the Run
  3. 12.312.3 Alerts That Fire
  4. 12.412.4 What It Costs
  5. 12.512.5 Retention and Evidence
  6. 12.612.6 Handover
  7. 12.712.7 The Capstone Brief
  8. 12.812.8 Capstone: Contain NE-THOMPSON-LT

Phase 0: Course Resources

ResourcesCheatsheets

One sheet per subject of the course: the question, the workflow fragment, query or command that answers it, what to read in the result and what it does not prove.

Show 8 lessonsHide lessons
  1. 1Workflow Definitions and Expressions
  2. 2Identity, Tokens and Secrets
  3. 3Querying Evidence and Enrichment
  4. 4Security API Calls and Code
  5. 5Approval and Containment
  6. 6Failure and Idempotency
  7. 7Deployment and Operations
  8. 8Lookup Values
ResourcesCookbooks

Seven runbooks, one per stage of building a security playbook: the lab, the specification, identities, evidence, containment, running twice safely, and deployment with its handover.

Show 7 lessonsHide lessons
  1. 1Running the Lab and a First Case
  2. 2Specifying a Playbook and Changing It
  3. 3Identities and Secrets for a Playbook
  4. 4Adding an Evidence or Enrichment Step
  5. 5Adding an Approved Containment Action
  6. 6Making a Playbook Safe to Run Twice
  7. 7Deploying to a Tenant and Handing Over
ResourcesLab Setup

The local lab every lesson runs in: what each part plays, what replaces it in a tenant, the settings and faults it can switch on, and how to prove it works and how far back its data reaches.

Show 3 lessonsHide lessons
  1. 1What the Lab Plays
  2. 2Settings, Faults and Activity
  3. 3Verifying the Lab and How Far Back It Reaches
ResourcesWalkthroughs

The six investigations the course automates, each worked end to end with the wrong turns: a suspicious sign-in, endpoint execution, a reported phish, an indicator, repeated incident updates and a failed containment.

Show 6 lessonsHide lessons
  1. 1A Suspicious Sign-In
  2. 2Suspicious Endpoint Execution
  3. 3A Reported Phish
  4. 4A Malicious Indicator
  5. 5Repeated Incident Updates
  6. 6Failed Containment
ResourcesPlaybooks

The template pack, and one playbook for each thing that fires once the triage playbook is deployed: a rule run that did not start it, a failed run, a failed containment, an incident nothing touched, and a release that did not verify.

Show 6 lessonsHide lessons
  1. 1The Template Pack
  2. 2Triage Not Started
  3. 3Triage Run Failed
  4. 4Triage Containment Failed
  5. 5High Incident Untouched
  6. 6Release Did Not Verify
ResourcesPractice Playground

The exercise that closes each module, with what each asks you to build, the lab it runs in, and how it is checked.

Show 1 lessonHide lessons
  1. 1Exercises and How They Are Checked
ResourcesReferences and Reading

Every Microsoft Learn page the lessons were built from, grouped by product, each with the lessons that rely on it.

Show 1 lessonHide lessons
  1. 1Microsoft Learn Pages

Course Completion

CompletionCourse Exam

Security Automation Engineering end-of-course exam: 29 questions in four parts, from building the workflow to operating it, ending on a case study.

Show 1 lessonHide lessons
  1. 1Course Completion. Security Automation Engineering

Course overview

A security playbook is software that acts on people's devices and accounts when an incident arrives. This course builds one, a Logic Apps Standard workflow for Microsoft Sentinel, from its first trigger to a deployment you operate, and proves every decision it makes before it makes it.

Modules 1 to 3 build the workflow, its specification as cases that run, and the identities it calls with. Modules 4 to 7 gather evidence through the query API, Microsoft Graph and Defender, enrich it, and add code where an expression is not enough. Modules 8 to 10 ask an analyst, contain a device or an account and verify it, and make the playbook safe when the same incident arrives twice. Modules 11 and 12 deploy it to your own tenant and operate it, and end on a capstone.

How this course works

Built and run, every lesson. Each of the 96 lessons changes the playbook and runs it: in the real Logic Apps runtime on your machine, against a harness that plays the Microsoft APIs from their documented shapes and lists every choice it had to make. Every run shown in a lesson is a run that happened.

Specified as cases. The playbook's decisions are written as cases that send an incident and check the reply, the run and the comment. A change that fails a case is reverted or decided, and the capstone's cases check your playbook the way they checked the reference.

Six investigations. A suspicious sign-in, endpoint execution, a reported phish, a malicious indicator, repeated incident updates and a failed containment, each with the control that makes automating it safe, and each worked end to end in the course resources. Two end with no action, because the evidence did not support one.

What you will learn

✓ Write a Logic Apps Standard workflow that reads a Sentinel incident, refuses the wrong shape and reports what it could not do
✓ Specify a playbook as cases that run, and change it only with the case that proves the change
✓ Give each call its own identity and only the permissions it needs, with secrets kept out of the definition
✓ Gather evidence through the query API, Microsoft Graph and Defender, and say exactly how complete it is
✓ Contain a device or an account only on an analyst's matched approval, then follow the action and verify it
✓ Package a tested deployment with Bicep and managed identities, and operate the playbook with alerts and a handover

Who this course is for

SOC analysts and security engineers who build or maintain Sentinel playbooks, or are about to. No prior Logic Apps experience is assumed: JSON, HTTP and the workflow definition are taught from first principles in Module 0 and Module 1. Some KQL, PowerShell or Python makes it go faster.

What this course does not cover: writing the detections whose incidents start the playbook (Threat Detection Engineering), investigation technique beyond what a playbook automates (Microsoft Security Operations), and third-party SOAR platforms. Microsoft's native automation layers (automation rules, the Sentinel connectors, Defender XDR response actions, Entra ID Protection and Copilot agents) and building in your own Sentinel workspace are covered in SEC412 Microsoft Security Automation, which builds on this course.

Things you need to know

What are the prerequisites?

None. Familiarity with Microsoft Sentinel helps you move faster, but every service, file and term is explained where it is first used.

What do I need?

A computer that runs Visual Studio Code with the Azure Logic Apps (Standard) extension, Python and Node.js; Module 0 installs each and checks its version, and the lab pack is one download. Modules 0 to 10 need no Azure subscription. Module 11 deploys to a Microsoft 365 tenant and an Azure subscription of your own.

What will I be able to do after this course?

You'll be able to build, test and run Sentinel playbooks as a SOC or security engineer: playbooks that gather evidence and say what it does not show, contain only on a matched approval and verify the result, and survive failure. You finish with a triage playbook ready to deploy, its specification, its templates and an operations handover.

Usage rights and disclaimer

Course materials: Licensed for individual professional development. You may deploy the workflows, templates, queries and functions in your own environment. You may not redistribute course content or share account credentials.

Automation artifacts: Provided as-is. Test every workflow in a non-production workspace first. Containment acts on real devices and accounts; the templates require approval and a recheck, and you are responsible for what they are allowed to act on.

Fictional environment: The lessons use a fictional company, Northgate Engineering. Any resemblance to real organizations is coincidental. The harness is a course tool, not a Microsoft service.

COURSE ASSESSMENT

End of Course Exam

Complete the course, then answer twenty-nine questions, from the workflow definition to operating the deployed playbook, ending on a case study, in 120 minutes. Pass mark: 70. Earn your certificate with CPE credits.

29questions
120minutes
100points
Take End of Course Exam

Answers are checked on the server. Certificate issued on pass.