You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> If a playbook created with the **Entity trigger** makes use of the **Incident ARM ID** field, then in the event that this playbook is triggered in a context unconnected to an incident, this field will be populated with a null value. The playbook will still run, but any actions that refer to the incident ID will be skipped.
116
-
>
117
-
> Examples of this situation might be if the playbook was run from an entity page accessed from the **Entity behavior** page, or as the result of a hunting query.
118
-
119
-
### Usage example - disable a user
112
+
### Disable a user
120
113
121
114
- Playbook is triggered by **Microsoft Sentinel Entity**
122
115
123
116
:::image type="content" source="media/playbook-triggers-actions/entity-trigger-actions.png" alt-text="Screenshot showing actions to take in an entity-trigger playbook to disable a user.":::
124
117
125
-
### Work with specific Entity types
118
+
### Entity playbooks with no incident ID
119
+
120
+
Playbooks created with the **Entity trigger** often make use of the **Incident ARM ID** field (for example, in order to update an incident after taking action on the entity).
121
+
122
+
If such a playbook is triggered in a **context unconnected to an incident** (for example, when threat hunting), then there is **no incident** whose ID can populate this field. In this case, the field will be populated with a null value.
123
+
124
+
**As a result, the playbook may fail to run to completion.** To prevent this failure, it's recommended to create a condition that will check for a value in the incident ID field before taking any actions on it, and prescribe a different set of actions if the field has a null value - that is, if the playbook isn't being run from an incident.
125
+
126
+
1. Before the first action that refers to the **Incident ARM ID** field, add a step of type **Condition**.
127
+
128
+
1. Select the **Choose a value** field and enter the **Add dynamic content** dialog.
129
+
130
+
1. Select the **Expression** tab and the **length(collection)** function.
131
+
132
+
1. Select the **Dynamic content** tab and the **Incident ARM ID** field.
133
+
134
+
1. Verify the resulting expression is `length(triggerBody()?['IncidentArmID'])` and select **OK**.
135
+
136
+
:::image type="content" source="media/playbook-triggers-actions/condition-incident-id.png" alt-text="Screenshot of dynamic content dialog to select fields for a playbook condition.":::
137
+
138
+
1. Set the **operator** and **value** in the condition to "is greater than" and "0".
139
+
140
+
:::image type="content" source="media/playbook-triggers-actions/condition-length.png" alt-text="Screenshot of final definition of condition described in the previous screenshot.":::
141
+
142
+
1. In the **True** frame, add the actions to be taken if the playbook is run from an incident context.
143
+
144
+
In the **False** frame, add the actions to be taken if the playbook is run from a non-incident context.
145
+
146
+
147
+
## Work with specific Entity types
126
148
127
149
The **Entities** dynamic field is an array of JSON objects, each of which represents an entity. Each entity type has its own schema, depending on its unique properties.
Copy file name to clipboardExpand all lines: articles/sentinel/tutorial-respond-threats-playbook.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,7 @@ This screenshot shows the actions and conditions you would add in creating the p
230
230
231
231
See [**Use triggers and actions in Microsoft Sentinel playbooks**](playbook-triggers-actions.md) for details about actions you can add to playbooks for different purposes.
232
232
233
-
In particular, note this important information about [**working with playbooks based on the entity trigger**](playbook-triggers-actions.md#work-with-entities).
233
+
In particular, note this important information about [**playbooks based on the entity trigger in a non-incident context**](playbook-triggers-actions.md#entity-playbooks-with-no-incident-id).
234
234
235
235
## Automate threat responses
236
236
@@ -376,4 +376,7 @@ You can see the run history for playbooks on a given entity by selecting the **R
376
376
## Next steps
377
377
378
378
In this tutorial, you learned how to use playbooks and automation rules in Microsoft Sentinel to respond to threats.
379
+
- Learn more about [authenticating playbooks to Microsoft Sentinel](authenticate-playbooks-to-sentinel.md)
380
+
- Learn more about [using triggers and actions in Microsoft Sentinel playbooks](playbook-triggers-actions.md)
381
+
- Learn more about
379
382
- Learn how to [proactively hunt for threats](hunting.md) using Microsoft Sentinel.
0 commit comments