How to Set Up Automated Playbooks in Microsoft Sentinel

Create SOAR playbooks in Microsoft Sentinel using Logic Apps. Automate incident response, enrichment, and remediation with step-by-step instructions.

18 min readUpdated January 2025

Want us to handle this for you?

Get expert help →

Playbooks bring Security Orchestration, Automation, and Response (SOAR) capabilities to Microsoft Sentinel, enabling automated threat response and investigation enrichment. Built on Azure Logic Apps, playbooks can interact with hundreds of services to automate your security workflows.

Prerequisites

Before creating playbooks, ensure you have:

  • Microsoft Sentinel workspace with incidents being generated
  • Azure subscription with permissions to create Logic Apps
  • Logic App Contributor role for creating playbooks
  • Microsoft Sentinel Contributor role for connecting playbooks
  • Owner or User Access Administrator role for granting permissions
  • API credentials for any third-party services you'll integrate

Understanding Playbook Architecture

How Playbooks Work

Analytics Rule → Incident Created → Automation Rule → Playbook Triggered
                                                            ↓
                                                    Logic App Workflow
                                                            ↓
                                              Actions (APIs, Notifications, etc.)

Playbook Trigger Types

Trigger TypeUse CaseInput Data
Incident triggerRespond to full incidentsIncident properties, alerts, entities
Alert triggerRespond to individual alertsAlert properties, entities
Entity triggerInvestigate specific entitiesEntity details

Logic Apps Types for Playbooks

TypeBest ForCharacteristics
ConsumptionMost playbooksPay-per-execution, template support
StandardHigh-volume automationDedicated resources, VNet support

Recommendation: Use Consumption Logic Apps for playbooks unless you have specific requirements for Standard.

Step 1: Plan Your Playbook

Before building, define what your playbook should accomplish:

Common Playbook Use Cases

CategoryExamples
EnrichmentLook up IP reputation, check user risk score, query threat intel
NotificationSend Teams/Slack message, create ticket in ServiceNow, send email
ContainmentDisable user account, isolate endpoint, block IP in firewall
InvestigationGather related logs, run hunting queries, create timeline
RemediationReset password, revoke sessions, quarantine file

Define Requirements

Document for your playbook:

  1. Trigger condition: When should this run?
  2. Input data needed: What incident/entity data is required?
  3. Actions to perform: What steps should be automated?
  4. Success criteria: How do you know it worked?
  5. Error handling: What happens if an action fails?

Step 2: Create a New Playbook

  1. In Microsoft Sentinel, go to Configuration > Automation
  2. Click Create > Playbook with incident trigger
  3. In the creation blade, look for Use a template option
  4. Browse available templates by category
  5. Select a template and click Create
  6. Configure template parameters
  7. Review and create

Option B: Create from Scratch

  1. Go to Configuration > Automation
  2. Click Create > Playbook with incident trigger
  3. Configure basic settings:
SettingValue
SubscriptionYour Azure subscription
Resource groupResource group for your Logic Apps
Playbook nameDescriptive name (e.g., "Enrich-IP-ThreatIntel")
RegionSame region as your Sentinel workspace
Enable diagnosticsYes (recommended)
  1. Click Review + create
  2. Click Create

Step 3: Design the Playbook Workflow

After creation, the Logic Apps designer opens automatically.

Understanding the Designer

The designer shows:

  • Trigger at the top (Microsoft Sentinel incident trigger)
  • Actions below that you add and connect
  • Parameters panel on the right for configuring each action

Add the Microsoft Sentinel Connector

The first action connects your playbook to Sentinel:

  1. Click New step
  2. Search for "Microsoft Sentinel"
  3. Select Get incident action
  4. Configure the connection:
    • Connection name: Descriptive name
    • Authentication: Managed Identity (recommended)
  5. In the action parameters:
    • Incident ARM ID: Select from dynamic content

Example Workflow: IP Enrichment Playbook

Let's build a playbook that enriches incidents with threat intelligence about IP addresses.

Step 1: Get Incident

  1. Already configured from trigger

Step 2: Parse Incident Entities

  1. Click New step
  2. Search for "Entities - Get IPs"
  3. Select the Microsoft Sentinel action
  4. Map Entities list from dynamic content

Step 3: Loop Through IPs

  1. Click New step
  2. Select Control > For each
  3. In "Select an output from previous steps", choose the IPs array

Step 4: Query Threat Intelligence Inside the For Each loop:

  1. Click Add an action
  2. Search for your threat intel provider (e.g., "VirusTotal", "AbuseIPDB")
  3. Configure the API call with the IP address

Step 5: Add Comment to Incident Still inside the loop:

  1. Click Add an action
  2. Select Microsoft Sentinel > Add comment to incident
  3. Configure:
    • Incident ARM ID: From trigger
    • Comment message: Format the threat intel results

Configure Managed Identity

Using Managed Identity is the recommended authentication method:

  1. Go to your Logic App in the Azure portal
  2. Under Settings, click Identity
  3. On the System assigned tab, set Status to On
  4. Click Save
  5. Grant the identity permissions on your Sentinel workspace:
    • Go to your Log Analytics workspace
    • Access control (IAM) > Add role assignment
    • Assign Microsoft Sentinel Responder role to the Logic App identity

Step 4: Grant Sentinel Permissions

For playbooks to run on incidents automatically:

  1. Go to Configuration > Automation in Sentinel
  2. Click Playbook permissions
  3. Click Configure permissions
  4. Select the resource group containing your playbooks
  5. Click Apply

This grants the Microsoft Sentinel service account the Microsoft Sentinel Automation Contributor role.

Step 5: Create an Automation Rule

Connect your playbook to incidents with an automation rule:

  1. Go to Configuration > Automation
  2. Click Create > Automation rule
  3. Configure the rule:
SettingConfiguration
Name"Auto-enrich IP incidents"
TriggerWhen incident is created
ConditionsAnalytics rule name contains "IP"
ActionsRun playbook > Select your playbook
Order1 (runs first)
StatusEnabled
  1. Click Apply

Automation Rule Conditions

You can trigger playbooks based on:

ConditionExample
Analytic rule nameContains "Brute Force"
SeverityEquals High
TacticsContains "Initial Access"
TitleContains specific keywords
Custom detailsMatch specific values

Step 6: Test Your Playbook

Manual Testing

  1. Go to Threat management > Incidents
  2. Select an incident
  3. Click Actions > Run playbook
  4. Select your playbook
  5. Click Run

Monitor Execution

  1. Open your Logic App in the Azure portal
  2. Go to Overview > Runs history
  3. Click on a run to see details
  4. Expand each action to see inputs and outputs
  5. Green checkmarks indicate success; red X indicates failure

Debug Failed Runs

For each failed action:

  1. Click to expand the action
  2. Review Inputs - Is the data correct?
  3. Review Outputs - What error was returned?
  4. Check Error message for specific issues

Common issues:

  • Missing permissions
  • Incorrect API credentials
  • Malformed dynamic content
  • Rate limiting from external APIs

Advanced Playbook Patterns

Conditional Logic

Use conditions to branch your workflow:

Condition: If IP reputation score > 70
├── Yes: Add "High Risk" tag, increase severity
└── No: Add informational comment only

Parallel Actions

Run multiple enrichments simultaneously:

  • Get VirusTotal reputation
  • Check AbuseIPDB
  • Query internal threat intel
  • All run in parallel, then merge results

Error Handling

Add error handling for resilience:

  1. Click ... on an action
  2. Select Configure run after
  3. Check "has failed" option
  4. Add actions to handle the error (notify, retry, skip)

Approval Workflows

For high-impact actions like disabling users:

  1. Add Approval connector action
  2. Send approval request to Teams/Email
  3. Add condition to check approval response
  4. Only proceed if approved

Example: Complete Incident Response Playbook

Here's a production-ready playbook structure:

Trigger: When incident is created
   ↓
Get incident details
   ↓
Parse entities (Users, IPs, Hosts)
   ↓
┌─────────────────────────────────────┐
│ Parallel Branch                      │
├──────────────┬──────────────────────┤
│ For each IP  │ For each User        │
│ - VirusTotal │ - Get Azure AD info  │
│ - AbuseIPDB  │ - Check risk score   │
│ - GeoIP      │ - Recent sign-ins    │
└──────────────┴──────────────────────┘
   ↓
Combine enrichment results
   ↓
Update incident with enrichment data
   ↓
Condition: High severity findings?
├── Yes:
│   - Post to Teams SOC channel
│   - Create ServiceNow ticket
│   - Assign to senior analyst
└── No:
    - Add informational comment
   ↓
Log execution to Azure Monitor

Playbook Best Practices

PracticeBenefit
Use Managed IdentityMore secure than stored credentials
Add comments in Logic AppsDocuments workflow for others
Implement error handlingPrevents silent failures
Test with various incident typesEnsures broad compatibility
Monitor run history regularlyCatches issues early
Version control via ARM templatesEnables backup and deployment
Start simple, iterateBuilds reliable automation incrementally

Security Considerations

ConsiderationRecommendation
Credential storageUse Key Vault for API keys
Network accessRestrict Logic App network if possible
Audit loggingEnable diagnostic settings
Least privilegeGrant minimum required permissions
Sensitive dataAvoid logging PII or secrets

Next Steps

After deploying playbooks:

  1. Monitor execution metrics - Track success rates and performance
  2. Iterate based on feedback - Improve based on analyst input
  3. Expand coverage - Create playbooks for more incident types
  4. Build a playbook library - Standardize common response actions
  5. Document runbooks - Record how and when playbooks should be used

Additional Resources


Need help automating your security operations? Inventive HQ specializes in SOAR implementation and can build custom playbooks for your unique environment. Contact us for a free consultation.

Frequently Asked Questions

Find answers to common questions

Automation rules are lightweight rules that run actions like assigning owners, changing severity, or triggering playbooks based on incident conditions. Playbooks are full Logic Apps workflows that can perform complex multi-step automations including API calls, conditional logic, and integrations with external systems. Use automation rules for simple actions and playbooks for sophisticated responses.

Need Professional IT & Security Help?

Our team of experts is ready to help protect and optimize your technology infrastructure.