Intermediate ⏱ 90 min 📋 12 Steps

Build an End-to-End SOC Workflow with Copilot

Learn how to create, test, share, and manage custom Promptbooks in Microsoft Security Copilot to standardise SOC workflows for consistent, repeatable investigations across every shift.

📋 Overview

About This Lab

Promptbooks in Microsoft Security Copilot are reusable, multi-step prompt sequences that automate common SOC workflows. Rather than manually typing a series of investigation prompts every time an incident occurs, analysts can execute a single Promptbook that runs an entire sequence of prompts. producing consistent, high-quality outputs regardless of who triggers the investigation.

In this lab, you will create custom Promptbooks for three critical SOC scenarios:

  • Incident Triage · A five-prompt sequence that summarises incidents, identifies attack vectors, extracts IOCs, assesses business impact, and recommends containment actions.
  • Phishing Investigation · A parameterised workflow that analyses suspicious emails, checks sender reputation, identifies affected users, and recommends response actions.
  • User Compromise Assessment · A focused assessment that evaluates a user’s risk profile, sign-in anomalies, device posture, and OAuth consent grants.

By the end of this lab you will have a library of production-ready Promptbooks that your SOC team can use immediately to accelerate investigations and ensure no critical step is missed.

🏢 Enterprise Use Case

Scenario: Contoso Financial Services operates a 24/7 SOC with three analyst shifts. Despite having documented runbooks, triage quality varies significantly between shifts. Shift A produces detailed, thorough reports while Shift C frequently misses lateral movement analysis and IOC extraction. New analysts require 4–6 weeks of shadowing before they can perform independent triage.

The Problem:

  • Inconsistent triage depth across shifts leads to missed threats and delayed containment.
  • Senior analysts spend 30% of their time reviewing and correcting junior analysts’ work.
  • Regulatory audits flag inconsistencies in investigation documentation.
  • When experienced analysts leave, institutional knowledge about investigation patterns leaves with them.

The Solution: By deploying custom Promptbooks in Security Copilot, Contoso standardises every investigation workflow. Every analyst. regardless of experience level. executes the same comprehensive prompt sequences. The Promptbooks encode the investigation patterns of the organisation’s best analysts, ensuring that critical steps like MITRE mapping, lateral movement checks, and business impact assessment are never skipped.

Measured Outcomes: After deploying Promptbooks, Contoso reduced mean time to triage by 62%, eliminated inter-shift quality variance, and cut new analyst onboarding time from 6 weeks to 10 days.

🎯 What You Will Learn

  1. Create custom Promptbooks from scratch using the standalone portal
  2. Use input parameters and variables to make Promptbooks dynamic and reusable
  3. Test Promptbooks against real incidents and iterate on prompt quality
  4. Share Promptbooks with your SOC team using role-based access controls
  5. Manage Promptbook versions and maintain export backups
  6. Explore and run built-in Microsoft Promptbooks for common scenarios
  7. Customise Promptbooks for organisation-specific investigation requirements
  8. Chain multiple Promptbooks together for comprehensive workflow coverage
  9. Monitor Promptbook usage, SCU consumption, and effectiveness metrics
  10. Build a shift handoff Promptbook to ensure seamless SOC transitions

🔑 Why This Matters

Promptbooks eliminate human variability in investigations, ensuring every analyst follows the same thorough process and reducing the risk of missed indicators. Instead of manually typing 5–8 prompts per incident, analysts execute a single Promptbook, cutting triage time from 45 minutes to under 15 minutes while producing more comprehensive outputs. For regulated industries, Promptbooks provide an auditable, consistent investigation methodology that satisfies compliance requirements. And when senior analysts encode their expertise into Promptbooks, that institutional knowledge remains with the organisation. new analysts immediately benefit from the accumulated wisdom of experienced team members.

⚙️ Prerequisites

  • Security Copilot provisioned · Complete Lab 01: Getting Started with Security Copilot first. You need an active Security Copilot workspace with at least 1 SCU provisioned.
  • Security Administrator role · You must have the Security Administrator or Security Operator role in Microsoft Entra ID to create and share Promptbooks.
  • Active incidents or alerts · Your environment should have incidents in Microsoft Defender XDR or Microsoft Sentinel to test Promptbooks against real data.
  • Familiarity with Security Copilot prompting · You should understand how to write effective prompts, use natural language queries, and navigate the standalone Security Copilot portal.
⚠️ Important: Promptbook creation and sharing requires the Security Copilot Contributor role or higher. Read-only users can run shared Promptbooks but cannot create new ones.

Step 1 · Explore Built-in Promptbooks

Before creating custom Promptbooks, start by exploring the library of Microsoft-provided Promptbooks. These serve as excellent templates and demonstrate best practices for prompt sequencing.

Navigate to the Promptbook Library

  1. Open the Security Copilot standalone portal at securitycopilot.microsoft.com.
  2. In the left navigation pane, click Promptbook library (book icon).
  3. You will see a list of all available Promptbooks, separated into Microsoft (built-in) and My organisation (custom) tabs.
  4. Click the Microsoft tab to view all built-in Promptbooks.

Review Key Built-in Promptbooks

Examine the following built-in Promptbooks and take note of their structure:

  • Incident investigation · Analyses a Defender XDR incident including entities, timeline, and recommended actions. Note how it uses the <<incident_id>> parameter.
  • Vulnerability impact assessment · Evaluates the blast radius of a specific CVE across your environment. Uses <<CVE_ID>> as an input parameter.
  • Threat actor profile · Provides comprehensive intelligence about a named threat actor, including TTPs, targeted industries, and known campaigns.
  • Suspicious script analysis · Decodes and analyses potentially malicious scripts found during investigations.

Run a Built-in Promptbook

  1. Click on the Incident investigation Promptbook.
  2. Click Run promptbook.
  3. When prompted, enter a valid incident ID from your Microsoft Defender XDR environment (e.g., 12345).
  4. Observe how Security Copilot executes each prompt in sequence, with each subsequent prompt building on the context established by previous prompts.
  5. Review the final output. notice how the Promptbook produces a comprehensive, structured investigation report.
💡 Pro Tip: Click the View prompts button on any built-in Promptbook to see the exact prompt sequence Microsoft uses. This is an invaluable reference when designing your own Promptbooks.

Step 2 · Understand Promptbook Structure

Every Promptbook consists of five key components. Understanding these components is essential before you begin creating your own.

Promptbook Components

Component Description Example
Name A descriptive, concise name for the Promptbook Incident Triage · Full Assessment
Description Explains the purpose and expected output Performs a comprehensive incident investigation including IOC extraction and remediation recommendations
Tags Categories for filtering and organisation Triage, Incident Response, SOC Tier 1
Input Parameters Dynamic values that analysts supply at runtime <<incident_id>>, <<user_upn>>
Prompt Sequence Ordered list of prompts that execute sequentially 5 prompts building from summary to remediation

How Context Flows Between Prompts

Each prompt in a Promptbook executes within the same Security Copilot session. This means:

  • Context accumulates · Each prompt can reference information from all previous prompts in the sequence.
  • Entities carry forward · If Prompt 1 identifies an IP address, Prompt 2 can reference “the IP address identified above” without re-specifying it.
  • Sequential execution · Prompts run one after another. Prompt 3 does not execute until Prompt 2 has completed.
  • Plugin context persists · If Prompt 1 activates a plugin (e.g., Microsoft Defender XDR), subsequent prompts can continue using that plugin’s capabilities.

Parameter Syntax

Parameters use double angle brackets to define placeholders that analysts fill in at runtime:

// SECURITY COPILOT PROMPTBOOK PARAMETER SYNTAX
// Parameters use double angle brackets <<name>> as runtime placeholders
// When an analyst runs the Promptbook, Copilot prompts for each value
// Parameter names should be descriptive to guide correct input

<<incident_id>>     → Analyst enters: 45821           // Defender XDR incident number
<<user_upn>>        → Analyst enters: john.doe@contoso.com  // Entra ID user principal name
<<sender_address>>  → Analyst enters: phish@malicious-domain.com  // Reported phishing sender
<<CVE_ID>>          → Analyst enters: CVE-2024-21887  // NVD vulnerability identifier
💡 Pro Tip: Use descriptive parameter names that make it obvious what input the analyst should provide. <<incident_id>> is clearer than <<id>>. You can also add a description to each parameter when creating the Promptbook.

Step 3 · Create an Incident Triage Promptbook

Now you will create your first custom Promptbook. a comprehensive incident triage workflow with five sequential prompts that guide an analyst through a complete investigation.

Create the Promptbook

  1. In the Security Copilot portal, go to Promptbook library.
  2. Click + Create new promptbook.
  3. Enter the following details:
    • Name: Incident Triage · Full Assessment
    • Description: Performs a comprehensive five-step incident triage covering summary, attack vector analysis, IOC extraction, business impact assessment, and remediation recommendations.
    • Tags: Triage, Incident Response, SOC Tier 1, SOC Tier 2

Add the Prompt Sequence

Add the following five prompts in order. Each prompt builds on the context established by the previous one:

Prompt 1 · Incident Summary

// PROMPTBOOK STEP 1: Incident Summary
// PARAMETER: <<incident_id>> - Defender XDR incident number (e.g., 45821)
// PLUGIN: Microsoft Defender XDR (queries incidents, alerts, entity graph)
// OUTPUT: Structured summary with severity, entities, and MITRE ATT&CK mapping
Summarise incident <<incident_id>> including severity, status, affected entities 
(users, devices, IP addresses, mailboxes), and all associated MITRE ATT&CK techniques. 
Present the information in a structured format with clear sections.

Prompt 2 · Attack Vector Analysis

// PROMPTBOOK STEP 2: Attack Vector Analysis
// PLUGIN: Microsoft Defender XDR (alert timeline, process tree, network events)
// PURPOSE: Identify how the attacker got in and how far they progressed
// WHY: Session context carries the incident from Step 1 - no need to re-specify
// OUTPUT: Initial access method, lateral movement map, chronological event timeline
Based on the incident above, what was the initial access vector? Has there been 
evidence of lateral movement to other devices or accounts? Include a timeline of 
key events from initial access to the most recent activity.

Prompt 3 · IOC Extraction

// PROMPTBOOK STEP 3: IOC Extraction
// PLUGINS: Defender XDR (evidence) + MDTI (threat intelligence verdicts)
// PURPOSE: Extract all IOCs for blocking, hunting, and TI sharing
// OUTPUT: Table with IOC Type | Value | Context | TI Verdict columns
// TIP: Use extracted IOCs to update block lists and create detection rules
List all Indicators of Compromise (IOCs) associated with this incident. Include 
IP addresses, domain names, file hashes (SHA-256), URLs, email addresses, and 
any registry keys or file paths. Format as a table with columns: IOC Type, 
Value, Context, and Threat Intelligence Verdict.

Prompt 4 · Business Impact Assessment

// PROMPTBOOK STEP 4: Business Impact Assessment
// PLUGINS: Defender XDR (entities) + Entra ID (role data) + Purview (data classification)
// PURPOSE: Translate technical findings into business risk for leadership reporting
// OUTPUT: Affected critical assets, data exposure risk, regulatory implications
What is the business impact of this incident? Which critical assets are affected? 
Assess data exposure risk, operational impact, and potential regulatory implications. 
Include whether any privileged accounts or sensitive data repositories were accessed.

Prompt 5 · Remediation Recommendations

// PROMPTBOOK STEP 5: Remediation Recommendations
// PLUGIN: Microsoft Defender XDR (available response actions)
// PURPOSE: Generate actionable remediation plan with team assignments and urgency
// OUTPUT: Prioritised action list with responsible team, urgency, and Defender actions
// NOTE: Defender actions (isolate device, disable account) can be executed directly
Generate recommended containment and remediation actions in priority order. For each 
action, specify: the action to take, which team is responsible (SOC, IT Ops, Identity), 
urgency level (Immediate, Short-term, Long-term), and any relevant Microsoft Defender 
actions that can be taken directly (e.g., isolate device, disable account, block IOC).
  1. After adding all five prompts, click Save.
  2. Verify the Promptbook appears in your My organisation tab.
⚠️ Important: Each prompt in a Promptbook consumes SCUs when executed. A five-prompt Promptbook will consume approximately 5 × the SCU cost of a single prompt. Monitor your SCU usage when testing.

Step 4 · Create a Phishing Investigation Promptbook

Phishing is the most common attack vector in enterprise environments. This Promptbook standardises how your SOC investigates reported phishing emails, ensuring no step is missed.

Promptbook Configuration

  • Name: Phishing Email Investigation
  • Description: Investigates a reported phishing email by analysing sender reputation, similar emails in the environment, malicious content, affected users, and recommended response actions.
  • Tags: Phishing, Email Security, SOC Tier 1, MDO
  • Parameters: <<email_subject>>, <<sender_address>>, <<recipient>>

Prompt Sequence

Prompt 1 · Sender Reputation Check

// PROMPTBOOK STEP 1: Sender Reputation Check
// PARAMETER: <<sender_address>> - email address of the reported phishing sender
// PLUGINS: Defender for Office 365 (email auth) + MDTI (domain reputation)
// OUTPUT: SPF/DKIM/DMARC results, domain age, TI matches, first-time sender flag
Analyse the sender <<sender_address>> for reputation and threat intelligence. 
Check if this sender or domain has been previously flagged as malicious, check 
SPF/DKIM/DMARC authentication results, and determine if this is a first-time 
sender to our organisation. Include any threat intelligence matches.

Prompt 2 · Similar Email Analysis

// PROMPTBOOK STEP 2: Similar Email Analysis (Blast Radius)
// PARAMETERS: <<email_subject>> - subject line; <<sender_address>> - sender email
// PLUGIN: Defender for Office 365 (email trace, delivery actions)
// PURPOSE: Determine how many users were targeted by this phishing campaign
// OUTPUT: Recipient list with delivery status (inbox/quarantined/blocked)
Search for similar emails in our environment with subject containing 
"<<email_subject>>" or from sender <<sender_address>> in the last 7 days. 
How many users received this email? List all recipients and whether the 
email was delivered to inbox, quarantined, or blocked.

Prompt 3 · Malicious Content Analysis

// PROMPTBOOK STEP 3: Malicious Content Analysis
// PARAMETERS: <<recipient>> - target user; <<sender_address>> - sender
// PLUGINS: MDO (Safe Links, Safe Attachments detonation) + MDTI (URL reputation)
// PURPOSE: Analyse URLs for credential harvesting and attachments for malware
// OUTPUT: URL reputation, redirect chain, attachment file type/hash/detonation verdict
Analyse the content of the email sent to <<recipient>> from <<sender_address>>. 
Are there any URLs in the email? If so, check their reputation and whether they 
redirect to credential harvesting pages. Are there any attachments? If so, what 
are their file types, hashes, and detonation verdicts?

Prompt 4 · Affected Users Assessment

// PROMPTBOOK STEP 4: Affected Users Assessment
// PLUGINS: MDO (click/open telemetry) + Entra ID (sign-in anomalies, OAuth)
// PURPOSE: Identify which users interacted with the phish and check for compromise
// OUTPUT: Users who clicked/opened, credential submission evidence, compromise signs
For all users who received this phishing email, determine: Did anyone click on 
URLs in the email? Did anyone open attachments? Did anyone submit credentials 
on a linked page? Have any affected user accounts shown signs of compromise 
since receiving the email (anomalous sign-ins, mail forwarding rules, OAuth grants)?

Prompt 5 · Response Recommendations

// PROMPTBOOK STEP 5: Response Recommendations
// PLUGIN: Defender for Office 365 (available admin actions)
// PURPOSE: Generate a prioritised phishing response plan with MDO-specific actions
// OUTPUT: 4-tier action plan: containment, user remediation, hardening, detection
// NOTE: MDO actions include: block sender, purge emails, submit to Microsoft
Based on this phishing investigation, provide prioritised response actions:
1. Immediate containment actions (block sender, purge emails, revoke sessions)
2. User remediation (password resets, MFA re-registration, user notification)
3. Environment hardening (mail flow rules, safe links policy updates)
4. Detection improvements (new alert rules, IOC additions to block lists)
Include specific Microsoft Defender for Office 365 actions where applicable.
💡 Pro Tip: When testing this Promptbook, use a recent phishing email from your organisation’s submissions queue. Real-world data produces the most valuable test results and helps you fine-tune prompt wording for your specific environment.

Step 5 · Create a User Compromise Assessment Promptbook

When an account is suspected of being compromised, analysts need a fast, thorough assessment. This Promptbook automates the complete user compromise investigation workflow.

Promptbook Configuration

  • Name: User Compromise Assessment
  • Description: Comprehensive assessment of a potentially compromised user account, including identity risk, sign-in anomalies, device health, OAuth consents, and recommended containment actions.
  • Tags: Identity, Compromise, SOC Tier 2, Entra ID
  • Parameters: <<user_upn>>

Prompt Sequence

Prompt 1 · User Risk Profile

// PROMPTBOOK STEP 1: User Risk Profile
// PARAMETER: <<user_upn>> - Entra ID UPN of the suspected compromised user
// PLUGINS: Microsoft Entra ID (risk, roles, MFA) + Audit logs (recent changes)
// OUTPUT: Risk level, role memberships, MFA status, recent account changes
Provide a comprehensive risk profile for user <<user_upn>> from Microsoft Entra ID. 
Include: current risk level, risk detections history, assigned roles and group 
memberships, MFA registration status, and whether this is a privileged account. 
Also list any recent changes to the account (password resets, role assignments, 
group membership changes).

Prompt 2 · Sign-in Anomaly Analysis

// PROMPTBOOK STEP 2: Sign-in Anomaly Analysis
// PLUGIN: Microsoft Entra ID (sign-in logs, Identity Protection risk detections)
// PURPOSE: Identify impossible travel, unfamiliar devices, and credential abuse
// TIMEFRAME: Past 14 days for comprehensive anomaly detection
// OUTPUT: Timeline of suspicious sign-in events with location, device, and risk flags
Analyse recent sign-in activity for this user over the past 14 days. Identify any 
anomalies including: sign-ins from unusual locations or IP addresses, impossible 
travel scenarios, sign-ins from unfamiliar devices or browsers, failed MFA 
challenges, sign-ins using legacy authentication protocols, and any token replay 
activity. Present a timeline of suspicious events.

Prompt 3 · Device Posture Check

// PROMPTBOOK STEP 3: Device Posture Check
// PLUGINS: Intune (compliance) + Defender for Endpoint (risk level, alerts)
// PURPOSE: Check if the user's devices are compromised or non-compliant
// OUTPUT: Device list with compliance status, MDE risk, alerts, OS patch level
List all devices associated with this user. For each device, check: compliance 
status in Intune, risk level in Microsoft Defender for Endpoint, any active 
alerts or incidents, last seen timestamp, and OS patch level. Flag any devices 
that are non-compliant or have active threats.

Prompt 4 · OAuth and Application Consent Review

// PROMPTBOOK STEP 4: OAuth and Application Consent Review
// PLUGINS: Defender for Cloud Apps (OAuth consents) + Exchange Online (mail rules)
// PURPOSE: Detect attacker persistence via malicious OAuth apps or mail forwarding
// KEY SIGNALS: Mail.Read/ReadWrite permissions, unverified publishers, inbox rules
// OUTPUT: List of suspicious consents and mail rules flagged as potential persistence
Review all OAuth application consents granted by this user. Identify any suspicious 
or overprivileged consents, especially: apps with Mail.Read or Mail.ReadWrite 
permissions, apps granted in the last 30 days, apps from unverified publishers, 
and any inbox rules or mail forwarding rules configured on the user's mailbox. 
Flag anything that could indicate persistence by an attacker.

Prompt 5 · Containment Recommendations

// PROMPTBOOK STEP 5: Containment Recommendations (Verdict)
// PURPOSE: Synthesise all prior steps into a compromise verdict and action plan
// OUTPUT: Compromise verdict (Yes/No) with confidence level, 4-step remediation plan
// NOTE: Actions include Defender responses (revoke sessions, disable account)
Based on the complete assessment above, provide a verdict: Is this account likely 
compromised? If yes, provide prioritised containment actions:
1. Immediate actions (revoke sessions, reset password, disable account if needed)
2. Persistence removal (revoke OAuth consents, remove mail rules, re-register MFA)
3. Scope assessment (check if compromised account was used to attack others)
4. Recovery steps (re-enable account securely, user communication, monitoring period)
Include the confidence level of your assessment and any gaps in available data.
💡 Pro Tip: For the most thorough results, ensure the Microsoft Entra ID, Microsoft Defender for Endpoint, and Microsoft Defender for Cloud Apps plugins are all enabled in Security Copilot. This Promptbook draws data from multiple sources.

Step 6 · Test Promptbooks with Real Data

Testing with real data is essential to validate that your Promptbooks produce actionable, high-quality output. In this step, you will run each Promptbook and refine the prompts based on the results.

Test the Incident Triage Promptbook

  1. Navigate to Promptbook library > My organisation.
  2. Click Incident Triage · Full Assessment.
  3. Click Run promptbook and enter a valid incident ID from Defender XDR.
  4. Wait for all five prompts to complete (this typically takes 2–3 minutes).
  5. Review each prompt’s output and evaluate:
    • Is the incident summary comprehensive enough?
    • Did it correctly identify the attack vector?
    • Were all IOCs extracted in the requested table format?
    • Is the business impact assessment relevant to your organisation?
    • Are the remediation actions specific and actionable?

Test the Phishing Investigation Promptbook

  1. Identify a recent phishing submission from your user reported messages queue or from Defender for Office 365 alerts.
  2. Run the Phishing Email Investigation Promptbook with the email subject, sender address, and recipient.
  3. Evaluate whether the sender reputation analysis is thorough and whether it correctly identified similar emails in your tenant.

Test the User Compromise Assessment Promptbook

  1. Select a user with a medium or high risk level in Entra ID Protection (or use a test account).
  2. Run the User Compromise Assessment Promptbook with the user’s UPN.
  3. Verify that the assessment pulls data from Entra ID, Defender for Endpoint, and Defender for Cloud Apps.

Iteration Guidelines

Based on your test results, refine prompts using these strategies:

  • Be more specific · If outputs are too generic, add specific instructions like “format as a table” or “include MITRE technique IDs”.
  • Add context constraints · Specify time ranges (“in the last 14 days”) and scope (“only production servers”).
  • Request structured output · Ask for tables, numbered lists, or specific sections to make outputs consistent.
  • Include negative checks · Add phrases like “if no evidence is found, state so explicitly” to prevent hallucinated findings.
⚠️ Important: Each test run consumes SCUs. Plan your testing sessions to be efficient. make notes on all changes needed after one run, update the Promptbook, then test again, rather than running multiple iterations in rapid succession.

Step 7 · Add Conditional Logic and Variables

While Promptbooks execute prompts sequentially, you can design prompts that intelligently adapt based on the context established by earlier prompts. This creates a pseudo-conditional investigation flow.

Leveraging Context for Branching

Since each prompt in a Promptbook has access to the full context of previous outputs, you can write prompts that conditionally focus on different areas based on findings:

// CONDITIONAL PROMPT PATTERN: Lateral Movement Branch
// PURPOSE: Adapts investigation depth based on findings from earlier prompts
// HOW IT WORKS: Copilot evaluates session context and follows the matching branch
// IF lateral movement found → generates detailed movement map with techniques
// IF no lateral movement → assesses risk and credential exposure instead
If the previous analysis identified lateral movement, provide a detailed 
lateral movement map showing source device, destination devices, techniques 
used (e.g., PsExec, WMI, RDP), and timestamps. If no lateral movement was 
detected, analyse whether the attacker has the credentials and access 
required to attempt lateral movement and assess the risk.

Using Variables Across Prompts

You can reference outputs from earlier prompts using natural language references. Security Copilot maintains session context, so these patterns work reliably:

// CROSS-PROMPT VARIABLE REFERENCES
// Security Copilot maintains full session context across all Promptbook steps
// Use natural language references to carry forward entities and findings

// Prompt 3 can reference Prompt 1's output:
// WHY: IOCs extracted in Step 1 are automatically available in subsequent steps
"For each IOC identified in the incident summary above, check if it appears 
in any other incidents in the last 30 days."

// Prompt 4 can reference Prompt 2 and 3:
// WHY: Combines attack vector (Step 2) with IOCs (Step 3) for scope assessment
"Considering the attack vector and IOCs identified above, which other 
devices or users in our environment may be at risk?"

Designing Adaptive Prompts

Use conditional language patterns to make prompts adaptive:

  • “If… then analyse… otherwise assess…” · Directs the investigation based on findings.
  • “For each [entity] identified above…” · Iterates over dynamically discovered entities.
  • “Based on the severity determined above…” · Adjusts depth of investigation based on prior assessment.
  • “If privileged accounts are involved, additionally check…” · Adds extra investigation steps for high-impact scenarios.

Example: Adaptive Severity-Based Investigation

// ADAPTIVE SEVERITY-BASED INVESTIGATION PROMPT
// PURPOSE: Adjusts report depth and audience based on incident severity from prior steps
// HIGH/CRITICAL → Executive CISO briefing with financial and regulatory impact
// MEDIUM → SOC manager report with shift handoff notes
// LOW → Brief summary confirming automated remediation status
Based on the incident severity and business impact assessed above:
- If this is a high/critical severity incident affecting privileged accounts 
  or critical assets, provide an executive summary suitable for CISO briefing, 
  including estimated financial impact and regulatory notification requirements.
- If this is a medium severity incident, provide a standard incident report 
  suitable for the SOC manager with next-shift handoff notes.
- If this is a low severity incident, provide a brief summary and confirm 
  whether automated remediation has been applied or manual action is needed.
💡 Pro Tip: Test adaptive prompts with incidents of different severity levels to ensure the conditional logic produces appropriate depth of analysis for each scenario. A high-severity investigation should noticeably more thorough than a low-severity one.

Step 8 · Share Promptbooks with Your Team

Once you have tested and refined your Promptbooks, the next step is sharing them with your SOC team so all analysts can benefit from standardised workflows.

Share via the Portal

  1. Go to Promptbook library > My organisation.
  2. Click the three-dot menu (…) on the Promptbook you want to share.
  3. Select Share.
  4. Choose the sharing scope:
    • Everyone in the organisation · All Security Copilot users can see and run the Promptbook.
    • Specific people · Share with selected users or security groups.
  5. Click Share to confirm.

Role-Based Access Considerations

Role Can Create Can Share Can Run Can Edit
Copilot Owner ✅ (all)
Copilot Contributor ✅ (own)
Copilot Reader ✅ (shared)

Naming Conventions and Tagging Best Practices

Establish consistent conventions so your team can quickly find the right Promptbook:

  • Naming format: [Category] · [Specific Purpose] (e.g., “Phishing · Email Investigation”, “Identity · Compromise Assessment”).
  • Tag categories: Include the SOC tier (Tier 1, Tier 2), the relevant product (MDO, MDE, Entra ID), and the workflow type (Triage, Investigation, Response).
  • Version in description: Include a version note in the description (e.g., “v2.1 · Updated March 2026”).
  • Owner identification: Note the Promptbook owner and team in the description for maintenance contacts.
💡 Pro Tip: Create a Teams channel or SharePoint page listing all available Promptbooks with their purpose, parameters, and usage guidelines. This serves as a quick reference for analysts who may not know which Promptbook to use for a given scenario.

Step 9 · Import and Export Promptbooks

Exporting Promptbooks as JSON enables backup, version control, cross-tenant sharing, and disaster recovery. This step covers the complete import/export workflow.

Export a Promptbook

  1. Navigate to Promptbook library > My organisation.
  2. Click the three-dot menu (…) on the Promptbook you want to export.
  3. Select Export. The Promptbook will download as a JSON file.
  4. Save the file with a descriptive name that includes the version, e.g., IncidentTriage-FullAssessment-v2.1.json.

Exported JSON Structure

The exported JSON contains the complete Promptbook definition:

// PROMPTBOOK EXPORT JSON SCHEMA
// PURPOSE: Backup, version control, and cross-tenant sharing of Promptbooks
// FORMAT: JSON file downloaded from Security Copilot portal via Export menu
{
  "name": "Incident Triage · Full Assessment",       // Display name in Promptbook library
  "description": "Performs a comprehensive five-step incident triage...",
  "tags": ["Triage", "Incident Response", "SOC Tier 1"],  // Filterable categories
  "inputs": [                                        // Runtime parameters
    {
      "name": "incident_id",                          // Maps to <<incident_id>> in prompts
      "description": "The Defender XDR incident ID to investigate",
      "type": "string"                                // Always string type for parameters
    }
  ],
  "prompts": [                                       // Ordered prompt sequence
    {
      "order": 1,                                    // Execution order (sequential)
      "content": "Summarise incident <<incident_id>> including..."
    },
    {
      "order": 2,                                    // Inherits session context from prompt 1
      "content": "Based on the incident above, what was the initial..."
    }
  ]
}

Import a Promptbook

  1. In the Promptbook library, click + Create new promptbook.
  2. Click Import from file (or Upload depending on the portal version).
  3. Select the JSON file from your local machine or shared location.
  4. Review the imported Promptbook. verify the name, description, parameters, and prompt sequence.
  5. Make any necessary adjustments for your environment and click Save.

Version Management Strategy

  • Git repository: Store exported Promptbook JSON files in a Git repository for version history, change tracking, and team collaboration.
  • Semantic versioning: Use v1.0, v1.1, v2.0 naming. increment the major version for significant prompt changes and minor version for wording adjustments.
  • Change log: Maintain a CHANGELOG.md file documenting what changed in each version and why.
  • Scheduled exports: Set a calendar reminder to export all Promptbooks monthly as a backup.
⚠️ Important: When importing Promptbooks from other teams or tenants, always review each prompt carefully before deploying. Promptbooks designed for another organisation may reference plugins, KQL queries, or entity types that differ in your environment.

Step 10 · Create a Shift Handoff Promptbook

One of the most valuable Promptbooks for any 24/7 SOC is a shift handoff report. This Promptbook generates a comprehensive end-of-shift summary that ensures the incoming team has full situational awareness.

Promptbook Configuration

  • Name: SOC Shift Handoff Report
  • Description: Generates a comprehensive end-of-shift summary including open incidents, actions taken, pending items, and priority recommendations for the next shift.
  • Tags: Shift Handoff, SOC Operations, Daily Report
  • Parameters: <<shift_hours>> (e.g., “last 8 hours”)

Prompt Sequence

Prompt 1 · Incident Summary

// SHIFT HANDOFF STEP 1: Incident Summary
// PARAMETER: <<shift_hours>> - time window (e.g., "last 8 hours")
// PLUGIN: Microsoft Defender XDR + Microsoft Sentinel (incident listing)
// OUTPUT: Categorised incident list (New/Updated/Resolved) with counts
List all security incidents created or updated in the <<shift_hours>>. For each 
incident, include: incident ID, title, severity, current status, assigned analyst, 
and a one-line summary. Separate into three categories: New incidents, Updated 
incidents, and Resolved incidents. Show counts for each category.

Prompt 2 · Actions Taken

// SHIFT HANDOFF STEP 2: Actions Taken
// PLUGIN: Defender XDR (response action log)
// PURPOSE: Document all containment/remediation actions performed during this shift
// OUTPUT: Summary of devices isolated, accounts disabled, IOCs blocked, escalations
For all incidents worked during this shift, summarise the key actions taken: 
devices isolated, accounts disabled, IOCs blocked, escalations made, and any 
communication sent to stakeholders. Highlight any containment actions that are 
still in progress or pending verification.

Prompt 3 · Pending Items

// SHIFT HANDOFF STEP 3: Pending Items
// PURPOSE: Generate a prioritised checklist for the incoming shift
// OUTPUT: Categorised open items - active investigations, pending approvals,
//         unverified containment actions, and scheduled follow-ups
Identify all open items that require attention from the incoming shift:
1. Incidents still under investigation (include current status and next steps)
2. Pending approvals or escalations awaiting response
3. Containment actions that need verification
4. Scheduled follow-ups with affected users or teams
Present as a prioritised checklist the incoming shift can action immediately.

Prompt 4 · Threat Landscape Update

// SHIFT HANDOFF STEP 4: Threat Landscape Update
// PARAMETER: <<shift_hours>> - same time window as Step 1
// PLUGINS: MDTI (threat campaigns, CVEs) + Microsoft Advisories
// PURPOSE: Brief the incoming shift on emerging threats and advisories
// OUTPUT: Active campaigns, new CVEs affecting the environment, security advisories
Provide a brief threat landscape summary for the incoming shift: Are there any 
active threat campaigns targeting our industry? Any new CVEs published that 
affect our environment? Any Microsoft security advisories issued in the 
<<shift_hours>>? Flag anything that may require proactive hunting or patching.

Prompt 5 · Priority Recommendations

// SHIFT HANDOFF STEP 5: Priority Recommendations
// PURPOSE: Synthesise all handoff data into a top-5 action list for the incoming shift
// OUTPUT: Numbered briefing list with action, urgency reason, incident context, and ETA
// TIP: Run this Promptbook 15 min before shift change for a structured verbal briefing
Based on everything above, provide the top 5 priority recommendations for the 
incoming shift, ranked by urgency. For each recommendation, specify:
- What needs to be done
- Why it's urgent
- The relevant incident ID or context
- Estimated time to complete
Format as a numbered list suitable for a shift handoff briefing.
💡 Pro Tip: Schedule the shift handoff Promptbook to run 15 minutes before shift change. The outgoing shift lead can review the output, add any manual notes, and hand the complete report to the incoming shift lead for a structured briefing.

Step 11 · Monitor Promptbook Usage and Effectiveness

Once your Promptbooks are deployed and shared with the team, you need to monitor their adoption, SCU consumption, and effectiveness to continuously improve them.

Track Usage Metrics

Security Copilot provides usage analytics that help you understand how Promptbooks are being used:

  • Execution count: How many times each Promptbook has been run. High usage indicates a valuable workflow; low usage may indicate the Promptbook needs improvement or better promotion.
  • Unique users: How many different analysts are using each Promptbook. If only one analyst uses a Promptbook, it may need broader training or awareness.
  • Completion rate: Whether analysts run the full Promptbook or stop midway. Early termination may indicate that later prompts are not producing useful outputs.
  • Time of day patterns: Understanding which shifts use which Promptbooks helps identify training gaps.

Monitor SCU Consumption

Each Promptbook run consumes SCUs. Track consumption to manage costs:

  1. Navigate to Security Copilot > Owner settings > Usage monitoring.
  2. Review SCU consumption by user, session, and time period.
  3. Identify which Promptbooks consume the most SCUs. complex Promptbooks with many prompts and large data queries will cost more.
  4. Optimise high-consumption Promptbooks by reducing unnecessary prompts or making queries more targeted.

Gather Analyst Feedback

Quantitative metrics only tell part of the story. Establish a feedback loop with your analysts:

  • Monthly review sessions: Gather the SOC team to discuss which Promptbooks are most valuable and which need improvement.
  • Feedback form: Create a simple form where analysts can submit suggestions for new Promptbooks or improvements to existing ones.
  • Output quality scoring: Ask analysts to rate the quality of Promptbook outputs on a 1–5 scale to track improvement over time.
  • Gap analysis: Identify investigation scenarios where analysts still rely on manual prompting because no Promptbook exists yet.

Continuous Improvement Cycle

Establish a quarterly Promptbook review cycle:

  1. Review usage metrics and analyst feedback.
  2. Update prompts based on new threat patterns and investigation techniques.
  3. Retire low-usage Promptbooks or merge them with more popular alternatives.
  4. Create new Promptbooks for emerging investigation scenarios.
  5. Export updated versions and archive previous versions for audit trail.
💡 Pro Tip: Create a “Promptbook Effectiveness Dashboard” in Power BI that visualises usage trends, SCU consumption per Promptbook, analyst adoption rates, and output quality scores over time. This makes it easy to report value to leadership and justify SCU investment.

Step 12 · Clean Up & Next Steps

Congratulations! You have built a library of custom Promptbooks that standardise critical SOC workflows. Here is a summary of what you accomplished and where to go next.

What You Accomplished

In this lab you:

  • Explored Microsoft’s built-in Promptbook library and ran a Promptbook against a real incident.
  • Understood Promptbook structure: name, description, tags, parameters, and prompt sequences.
  • Created three custom Promptbooks: Incident Triage, Phishing Investigation, and User Compromise Assessment.
  • Tested each Promptbook with real data and iterated on prompt quality.
  • Added conditional logic and context-aware variables to adaptive investigation prompts.
  • Shared Promptbooks with your team and established naming conventions.
  • Exported Promptbooks as JSON for backup and version management.
  • Built a shift handoff Promptbook for seamless SOC transitions.
  • Set up monitoring for Promptbook usage, SCU consumption, and effectiveness.

Clean Up

If you created test Promptbooks that are not intended for production use:

  1. Go to Promptbook library > My organisation.
  2. Click the three-dot menu on any test Promptbooks.
  3. Select Delete to remove them.
  4. Keep the production-quality Promptbooks you created. they will be valuable for ongoing SOC operations.

Continue Your Learning

Lab 03: Threat Intelligence Summarisation ↩

Learn to use Security Copilot for threat intelligence analysis, actor profiling, and vulnerability impact assessment across your environment.

Next Lab: Embedded Experiences & Zero Trust Deployment →

Explore Copilot embedded in Defender XDR, Sentinel, Entra, Intune, and Purview. Apply Zero Trust principles with Conditional Access, least privilege roles, PIM, and phased deployment.

📚 Documentation Resources

ResourceDescription
Using promptbooksOfficial guide to running and managing Promptbooks in Microsoft Security Copilot
Build custom promptbooksStep-by-step guide to creating custom Promptbooks with parameters and prompt sequences
Prompting tipsBest practices for writing effective prompts that produce high-quality, actionable outputs
Plugin overviewOverview of available plugins that extend Security Copilot capabilities for use in Promptbooks
← Lab 03 Next Lab →