Lesson 1 of 3 Microsoft Sentinel Automation and Data Management

Implementing Automation Rules and Playbooks

This lesson explains automation rules and Logic Apps playbooks, and how to give them permissions.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish automation rules from playbooks.
  • Describe triggers, conditions and actions.
  • Explain the two directions of playbook permissions.
  • Describe how to secure a playbook.

Why automate

A security operations team receives more incidents than it can read, and many of them follow predictable patterns. Automation removes the repetitive work, and it speeds up the response, which limits damage. Microsoft Sentinel has two tools. Automation rules handle incident management directly. Playbooks carry out more complex work across systems. They work together: an automation rule usually decides when to run a playbook.

Automation rule
What it isA simple rule in Sentinel
Best forTriage: assign, tag, close or change severity
Skills neededNone beyond configuration
ExampleAssign all phishing incidents to a team
Playbook
What it isA Logic Apps workflow
Best forMulti-step actions and external systems
Skills neededWorkflow design
ExampleDisable a user, and post to a chat channel
Sort into groups

Automation rule or playbook?

Exam skills 4.2.8

Decide whether each task suits an automation rule or a playbook.

Log in to try this activity Interactive activities are free with an account.

Automation rules

An automation rule has three parts: triggers, conditions and actions.

PartOptions
TriggerWhen incident is created, When incident is updated, or When alert is created
ConditionsIncident properties such as provider, title, severity, tags and entities
ActionsAssign an owner, change status, change severity, add a tag, add a task, or run a playbook

Rules run in the order that is set, so an earlier rule can change something that a later rule tests. Each rule can have an expiry date, which is useful for a temporary suppression during a planned test. A rule can close incidents that are known to be false positives, which removes noise without changing the analytics rule. In the Defender portal, Sentinel alert-trigger rules act only on Sentinel alerts. Defender XDR alerts use the Enhanced Alert Trigger. Rules can take up to 10 minutes to run, and Defender incidents can take up to 5 minutes to reach Sentinel.

The following diagram shows the three parts of an automation rule.

Automation rules in Microsoft Sentinel. A trigger, such as an incident being created or updated or an alert being created, starts the rule. Conditions on incident properties, such as provider, title, severity, tags and entities, decide whether it applies. Actions then assign an owner, change status or severity, add a tag or task, or run a playbook. Rules run in a set order, so an earlier rule can change what a later rule tests.
Automation rules decide; playbooks carry out multi-step responses.
True or false

Automation rule behaviour

Exam skills 4.2.8

Check how automation rules behave.

Log in to try this activity Interactive activities are free with an account.

Playbooks

A playbook is a workflow built on Azure Logic Apps, using either the Consumption or Standard plan. It uses connectors to reach hundreds of systems. A playbook has a trigger from Sentinel, such as the incident trigger, the alert trigger or the entity trigger, and then a sequence of actions.

A typical sequence for a compromised account might be to retrieve incident entities, look up the user, ask a person for approval in Microsoft Teams, disable the account, revoke tokens, add a comment to the incident and update its status. The trigger type matters, since incident-trigger automation rules can run only incident-trigger playbooks, and alert-trigger rules can run only alert-trigger playbooks. Manual runs on alerts and entities are not supported in the Defender portal.

Templates in the content hub provide many ready-made playbooks. Creating one needs Logic App Contributor, and running one manually needs Microsoft Sentinel Playbook Operator.

Permissions

Two sets of permissions are needed, and they run in opposite directions. Candidates often mix them up.

DirectionQuestionSolution
Sentinel to playbookHow can Microsoft Sentinel run the playbook?A special Sentinel service account needs permission on the playbook's resource group, and a person with Owner on that group grants it, through Settings.
Playbook to SentinelHow can the playbook read and change incidents?The playbook authenticates with a managed identity (Preview), a service principal or a Microsoft Entra user.

For the second direction, a managed identity is preferred. Assign it Microsoft Sentinel Responder if the playbook updates incidents or watchlists, and Microsoft Sentinel Reader if it only receives incidents. Assigning those roles needs Owner or User Access Administrator on the workspace. The identity also needs rights on anything else that the playbook touches, such as a Microsoft Graph permission to disable a user.

In a multitenant setup, the Azure Security Insights application needs Microsoft Sentinel Automation Contributor on the playbook's resource group, through Azure Lighthouse.

Scenario questions

Playbook permissions

Exam skills 4.2.8

Work out the permissions in each direction.

Log in to try this activity Interactive activities are free with an account.

Securing playbooks

A playbook often holds strong rights, such as disabling accounts, so an attacker who can edit it gains those rights. Limit Logic App Contributor, and treat playbooks as privileged code. For Standard-plan playbooks, inbound access can be restricted, by adding an allow rule with the service tag AzureSentinel at priority 1 under Networking > Inbound traffic configuration. Use secure inputs and outputs to keep sensitive data out of run history, as explained in the lesson on Logic Apps.

Worked example

Closing false positives and acting on a threat

A vulnerability scanner causes hundreds of false incidents each night. Separately, when a high-severity identity incident is created, the user must be disabled in Microsoft Entra ID after a team lead's approval. The playbook is built, but Sentinel reports that it does not have permission to run it. What should you do?

For the scanner, create an automation rule with the trigger When incident is created, conditions that match the scanner's address, and the action to close the incident as a benign positive. For the identity incident, use an automation rule that runs the playbook.

To fix the error, a person with Owner on the playbook's resource group must grant Sentinel permission through its settings. Giving a user Playbook Operator would allow manual runs, but it would not fix the service's access. Disabling the analytics rule would hide all incidents of that type, including real ones.

Check yourself

Can an alert-trigger automation rule run an incident-trigger playbook?

Show answer

No. The trigger types must match.

Exam Tips

Remember for the exam

  • Automation rules triage; playbooks act across systems.
  • Incident-trigger rules run only incident-trigger playbooks.
  • Owner on the resource group is needed to let Sentinel run a playbook.
  • A playbook's managed identity needs Responder to update incidents.