Incident response SOP template for analysts and AI agents
An incident response standard operating procedure (SOP) works for analysts and AI agents alike when it names its evidence, writes each decision as a testable condition with else and missing-evidence branches, and marks where a human approves. Copy the template, then test it on real incidents.
Managed security operations · Checklist · 9 min read ·
Who this is for
SOC leads and senior analysts who write the procedures your analysts and Security Delivery Agents follow, whether you secure one organization or many customers.
You'll learn
- The sections every incident response SOP needs, as a template you can copy
- How to turn a judgment call into a condition with an else branch and a missing-evidence branch
- How to map SOP outcomes to the classifications ContraForce, Microsoft Sentinel and Microsoft Defender XDR record
- Where customer-specific details belong, so you never fork the procedure
- How to test an SOP and enforce its approval points before an agent relies on it
It's 02:10, and a sign-in alert fires for a finance user. The sign-in came from a country that user has never signed in from. Your night analyst opens the SOP, and it says: investigate, and escalate if suspicious.
What counts as suspicious? Escalate to whom? A senior analyst fills those gaps from experience. A new analyst guesses, and an AI agent reading the same document can't stop to ask.
Write one SOP that both can follow, precise enough that a new analyst and an agent reach the same classification from the same evidence. When they disagree, the disagreement points at the sentence that needs work.
For the wider model, how Gamebook workflows turn an SOP into approval gates, evidence records and change control across every tenant, read Gamebook Workflows: Enforce SOPs Across Every Tenant.
What goes in an incident response SOP template?
Copy this structure once per incident type, and number every step under plain headings. A focused, structured SOP is easier to follow at 02:10, and easier for an agent to match to the right incident and the right section.
| Section | What to write |
|---|---|
| Header | ID, version, owner and next review date |
| Scope | The incident types covered, and where similar incidents go instead |
| Entry criteria | What must be true before anyone uses this SOP |
| Evidence | Numbered items, each with a data source and a time window |
| Missing evidence | What to record, and who takes over, when an evidence item can't be retrieved |
| Decisions | Numbered conditions, checked in order, each ending in a classification or an escalation |
| Response actions | Each action, named the way your response tool names it, and whether it needs approval |
| Approvals and escalation | Who approves, how long you wait, and what happens if nobody answers |
| Communication | Who you tell, when, and through which channel |
| Reference section | Where customer-specific values live: approved travel, egress IPs, VIPs, approvers, contacts |
How do you turn a judgment call into a condition?
Swap adjectives for tests. "If the sign-in is suspicious" becomes "If the sign-in country isn't in the user's sign-in history for the previous 30 days, and the reference section lists no approved travel there." Anyone can check that against the evidence, and so can an agent.
Then give every condition an else branch, so the reader always knows the next step, and a missing-evidence branch, so nobody fills a gap with a guess.
Order matters. Put the missing-evidence branch before any condition that an empty or failed result could satisfy. Otherwise a failed query looks like an empty result, and "the sign-in isn't in the log" quietly becomes a False Positive. A condition that fires only on evidence that's present, like a new forwarding rule, can come first.
Check that the evidence exists for the window you name. Microsoft Entra ID keeps sign-in and audit logs for 7 days on the Free edition and 30 days on P1 or P2, unless you route them elsewhere with Azure Monitor. A 30-day lookback on a Free tenant lands in the missing-evidence branch every time.
Treat location as a hint. Mobile carriers and VPNs assign IP addresses from pools that can sit far from the user, which is why the example below also checks known egress IPs.
How do you map SOP outcomes to classifications?
Keep status and classification apart: status is where the work is, and classification is what you found. Then map each outcome to exactly one value in the console where the incident gets closed, because ContraForce, Microsoft Sentinel and Microsoft Defender XDR don't share one list.
| SOP outcome | ContraForce | Microsoft Sentinel (Azure portal) | Microsoft Defender portal (legacy incidents) |
|---|---|---|---|
| Confirmed threat | True Positive | True Positive – suspicious activity | True positive, with a threat type |
| Real activity, expected or authorized | Benign Positive | Benign Positive – suspicious but expected | Informational, expected activity |
| Detection logic is wrong | False Positive, reason: incorrect alert logic | False Positive – incorrect alert logic | False positive |
| Data behind the alert is wrong | False Positive, reason: inaccurate data | False Positive – incorrect data | False positive |
| No firm verdict | Undetermined | Undetermined | No matching value (Not set is the default) |
In the Azure portal, Microsoft Sentinel won't close an incident without a classification. In the Defender portal, incident cases are now the recommended experience and their fields can vary by tenant configuration, so check what your tenants show before you settle the mapping.
Give Undetermined its own trigger and require a comment that lists the missing evidence. If it becomes the default, your classification data stops telling you anything.
Illustrative example: a suspicious sign-in SOP
This SOP is made up to show the pattern; the IDs, time windows and roles are placeholders. SOP-ID-004, Suspicious sign-in (single user). Version 2.3. Owner: SOC lead. Next review: <date>.
- Scope: sign-in alerts for a single Microsoft Entra ID user account. Alerts that cover several accounts go to your password spray SOP.
- Entry criteria: the incident contains one of <your sign-in alert types> and exactly one user entity.
- E1: the user's Microsoft Entra sign-in logs for the previous 30 days: location, IP address, application and authentication details.
- E2: Microsoft Entra audit log entries for security info (authentication methods) the user registered or changed in the previous 7 days, with the IP address each change came from.
- E3: the reference section's approved travel, each entry with a country and start and end dates, and its known egress IP addresses.
- E4: Exchange Online inbox rule events (New-InboxRule, Set-InboxRule and Set-Mailbox) for the user's mailbox in the previous 7 days, from the CloudAppEvents table in Microsoft Defender XDR advanced hunting, including any rule that forwards mail outside the organization.
Check the conditions in order. The first one that matches decides.
- If E4 shows a new rule that forwards mail to an external address that isn't another mailbox the user owns, or E2 shows an authentication method registered from the alert sign-in's IP address, classify True Positive and go to R1.
- Else, if any of E1 to E4 can't be retrieved, list what's missing in a comment and escalate to tier 2. If tier 2 can't recover it, close as Undetermined.
- Else, if E3 lists approved travel to the sign-in country with dates that cover the sign-in date, or the sign-in IP address is a known egress IP, classify Benign Positive and close with a comment that cites the E3 entry.
- Else, if the user in the alert doesn't exist or the sign-in isn't in E1, classify False Positive with the reason inaccurate data and tell detection engineering.
- Otherwise, escalate to tier 2. Don't close the incident.
- R1: If the user is on the VIP list in the reference section, take no automated action. Page the on-call lead and stop here.
- R2: Run Invalidate Existing Sessions for the user. No approval needed.
- R3: Run Reset MFA, then Reset User Password. Both need approval from an approver in the reference section. If nobody answers within the contracted time, page the on-call lead.
- Communication: for True Positive, notify the security contact in the reference section within the contracted time. For Benign Positive, include it in the monthly report.
Where do customer-specific details belong?
In a reference section at the end of each customer's copy of the SOP, or each business unit's copy if you secure one organization. The example never names a customer: every step that depends on one reads from the reference section, so the procedure above it stays identical everywhere.
Write exceptions as conditions too, and check them before the general rule, as R1 does: "For this customer, don't isolate plant-floor devices without a phone call to the plant manager." Where a platform can enforce an exception, enforce it there as well. A sentence in a document only works if the reader follows it.
When should you revise an SOP?
- After every True Positive post-incident review.
- After any disputed classification, including any incident where an agent and an analyst disagreed.
- When a customer's approvers, contacts or ruled-out actions change. Publish the new version the same day: an agent works from the text it's given.
- When classification trends move: a high False Positive rate points to detections that need tuning, and a high Benign Positive rate to exception lists that need updating.
How do you load the SOP into ContraForce?
ContraForce has two SOP types, and the template maps onto them. Put scope, entry criteria, evidence and decisions in a Classification SOP, and response actions, approvals and communication in a Response SOP.
- An agent can have several Classification SOPs, but only one is activated per investigation, so keep everything a classification needs, missing-evidence branch included, in one document.
- One Response SOP can be linked to several agents, and an agent can have several Response SOPs.
- SOPs are scoped to a workspace, so upload the shared procedure to each customer's workspace as a Markdown or plain-text file. An agent draws on the SOPs linked to it, so a customer detail you want it to weigh, such as known egress IPs, belongs in the reference section of that workspace's copy.
- To change an SOP, upload a new version. Links to agents are kept, and you record the change in the SOP's version field.
Details that change every week, like approved travel, are hard to keep current in an uploaded file. That's why each travel entry carries start and end dates, so an old trip can't match a new sign-in, and why the example ends with an Otherwise branch: if the agent can't confirm travel, an analyst gets the incident instead of a guess.
How do you test an SOP before an agent acts on it?
Run the agent alongside your analysts first. Linking an SOP to an agent takes effect immediately, and new agents default to On Queue, which is fully autonomous. So while you test, set every severity to Manual on the agent the SOP is linked to, and use Run agent investigation, which analyzes an incident without taking any remediation action.
Each run adds an AI Generated comment with the agent's classification, its malicious confidence, the SOPs it matched (under Knowledge) and its reasoning. Compare that with your analyst's verdict. If the agent matched the wrong SOP or reached a different outcome, fix the text, upload the new version and run it again.
How do you enforce approvals instead of describing them?
An approval written in an SOP depends on the reader honoring it. In ContraForce, response actions run as Gamebooks, and each workspace's run policies decide at run time whether an action is allowed, blocked or sent to an approver first.
- Policies are checked top to bottom, the first one that fits decides, and an action no policy covers is allowed. A policy can apply only to Security Delivery Agents, so you can gate agent actions without slowing your analysts.
- A policy can match the people or devices anywhere in the incident, which protects your VIPs whatever action is attempted. That's R1's no-automated-action rule, enforced.
- Until a Workspace Owner turns on Allow service providers to run gamebooks for the workspace, every Gamebook an agent submits waits for approval. Off is the default.
- Approvers come from the workspace's Approvers list, which only Workspace Owners can be on. Keep the approvers in your reference section in step with it.
Approval enforced, not just described
R3 needs approval for Reset MFA and Reset User Password. A run policy that sends Reset MFA to an approver for Security Delivery Agents enforces that, whatever the agent concluded from the text. Reset User Password already waits when an agent or a service provider runs it in a customer workspace, and only an admin in the customer's organization on the Approvers list can approve it, unless the customer turns on Allow service provider to reset passwords.
Before you rely on a policy, preview a Gamebook. Gamebook Preview shows each action's target, its policy verdict and who has to approve it, without running or storing anything.
Checklist
- The header shows an ID, version, owner and next review date.
- Scope names the incident types covered and where similar incidents go instead.
- Every evidence item has an ID, a data source and a time window.
- Every data source keeps logs for the window you name in each tenant you cover.
- Every decision is a testable condition, checked in order, with an else branch.
- Missing evidence has its own branch, placed before any condition that an empty or failed result could satisfy.
- Each outcome maps to exactly one classification value in the console where the incident is closed.
- Every response action uses the name your response tool uses and says whether it needs approval.
- Each approval step names who approves, how long you wait and what happens if nobody answers.
- Customer-specific values live in the reference section, not in the procedure text.
- Classification guidance and response guidance sit in separate documents.
- Investigation-only agent runs reached the same outcome as your analysts on real incidents of this type.
Recap
- Write every decision as a test against named evidence, checked in order, with an else branch and a branch for missing evidence.
- Keep customer specifics in a reference section the SOP points to, and enforce approvals with run policies instead of relying on the text.
- Split classification from response, and compare investigation-only agent runs with your analysts before an agent acts on its own.
In the ContraForce docs
Go deeper on contraforce.com
Sources
- Microsoft Learn, Basic incident tasks for Microsoft Sentinel incidents in the Azure portal
- Microsoft Learn, Manage incidents in the Microsoft Defender portal (legacy)
- Microsoft Learn, Manage incident cases in the Microsoft Defender portal
- Microsoft Learn, Microsoft Entra data retention
- Microsoft Learn, Learn about the sign-in log activity details
- Microsoft Learn, Microsoft Entra audit log activity reference
- Microsoft Learn, Learn about the audit logs in Microsoft Entra ID
- Microsoft Learn, Alert classification for suspicious inbox forwarding rules
- ContraForce Docs, SOPs for Security Delivery Agents
- ContraForce Docs, How to Classify Incidents: True vs False Positive
- ContraForce Docs, Configuring Security Delivery Agents
- ContraForce Docs, Security Incident Management: Triage to Closure
- ContraForce Docs, What Are Gamebooks? No-Code Incident Response
- ContraForce Docs, Workspace Policies for Gamebooks and Agents
- ContraForce Docs, Gamebook Preview: Test Before You Run
Reviewed by the ContraForce team · Published · Updated
Next up
Step 4 of 4 · Run Microsoft security across customer tenants
Microsoft Sentinel cost review checklist for each customer workspace
Run a monthly Microsoft Sentinel cost review per customer workspace: find the biggest tables, right-size the pricing tier, and split or move noisy data.
Microsoft Sentinel · Checklist
Read · 10 min
See it run on your own incidents.
Connect one supported workspace, validate access and your Gamebook workflow, then measure an eligible investigation in your own environment.
Connect one workspace: scoped Entra ID application consent, no endpoint agents, no log forwarding.