Requesting, previewing and approving containment
This walkthrough takes a containment, eradication, recovery or incident-update action from initial preview and request through policy evaluation, human approval (including two-approver and typed-confirmation gates), execution under blueboard-id-api, and dry-run cutover.
Who this is for
- Analysts and AI agents (
Board.Post+Board.RequestActions) proposing actions. - Human approvers (
Board.Post+Board.Approve) reviewing and deciding requests on Approvals (/approvals). - Board administrators (
Board.Post+Board.Admin) pausing or resuming the broker when needed.
Before you start
policy.jsonis reviewed and deployed (see 09 Policy governance, starter profiles and simulator).- For live execution, the required Microsoft Graph / Defender for Endpoint write permissions have been granted with
ACTIONS="…" ./infra/grant-permissions.shandBROKER_EXECUTE=trueis enabled. - Remember the non-self-approval rule: the person who files a request cannot approve it, so ensure at least two people hold
Board.Approveon shift.
The 26-action catalogue
Every brokered action is defined in api/Blueboard.Api/Actions/Catalog.cs. Destructive actions always require human approval even if mistakenly added to auto_approve.
Action (kind) | Stage | Destructive | Required permission | Key parameters |
|---|---|---|---|---|
isolate_device | contain | Yes | Machine.Isolate (MDE) | machine_id, isolation_type (Full | Selective) |
release_device | recover | Yes | Machine.Isolate (MDE) | machine_id |
run_av_scan | eradicate | No | Machine.Scan (MDE) | machine_id, scan_type (Quick | Full) |
collect_investigation_package | contain | No | Machine.CollectForensics (MDE) | machine_id |
restrict_app_execution | contain | Yes | Machine.RestrictExecution (MDE) | machine_id |
unrestrict_app_execution | recover | Yes | Machine.RestrictExecution (MDE) | machine_id |
stop_and_quarantine_file | eradicate | Yes | Machine.StopAndQuarantine (MDE) | machine_id, sha1 |
tag_device | contain | No | Machine.ReadWrite.All (MDE) | machine_id, tag, action (Add | Remove) |
block_indicator | contain | Yes | Ti.ReadWrite.All (MDE) | indicator_type (sha256 | sha1 | md5 | ip | domain | url), value, title, severity (Informational | Low | Medium | High), expires_in_days (1–365) |
unblock_indicator | recover | Yes | Ti.ReadWrite.All (MDE) | indicator_id (digits) |
disable_user | contain | Yes | User.EnableDisableAccount.All (Graph) | user (Entra UPN or OID) |
enable_user | recover | Yes | User.EnableDisableAccount.All (Graph) | user (Entra UPN or OID) |
revoke_sessions | contain | Yes | User.RevokeSessions.All (Graph) | user (Entra UPN or OID) |
reset_password | eradicate | Yes | User-PasswordProfile.ReadWrite.All (Graph) | user (Entra UPN or OID; sets random password + forces change at next sign-in) |
confirm_user_compromised | contain | Yes | IdentityRiskyUser.ReadWrite.All (Graph) | user_id (Entra OID GUID) |
dismiss_user_risk | recover | Yes | IdentityRiskyUser.ReadWrite.All (Graph) | user_id (Entra OID GUID) |
disable_service_principal | contain | Yes | Application.ReadWrite.All (Graph) | service_principal_id (OID GUID) |
purge_email | eradicate | Yes | SecurityAnalyzedMessage.ReadWrite.All (Graph) | messages ([{ network_message_id, recipient }]), action (softDelete | hardDelete | moveToJunk | moveToDeletedItems) |
update_incident | record | Yes | SecurityIncident.ReadWrite.All (Graph) | incident_id, status, classification, determination, assigned_to |
add_incident_comment | record | No | SecurityIncident.ReadWrite.All (Graph) | incident_id, comment |
publish_ti_indicator | contain | Yes | Sentinel Contributor (ARM) | kind, value, confidence (0–100), valid_days (1–90), tlp, description |
update_incident | record | Yes | SecurityIncident.ReadWrite.All (Graph) | incident_id, status, classification, determination, assigned_to |
add_incident_comment | record | No | SecurityIncident.ReadWrite.All (Graph) | incident_id, comment |
publish_ti_indicator | contain | Yes | Microsoft Sentinel Contributor (Azure RBAC) | kind, value, confidence, valid_days (1–90), tlp, description |
create_detection_rule | record | No (never auto-approved) | CustomDetection.ReadWrite.All (Graph) / Microsoft Sentinel Contributor for target: sentinel | target, name, query, frequency, lookback, severity, mitre, entity_mappings, enabled, backtest_id (required; see guide 08) |
disable_detection_rule | recover | Yes | as create_detection_rule | rule_action_id (a succeeded create_detection_rule) |
intune_sync_device | eradicate | No | DeviceManagementManagedDevices.PrivilegedOperations.All (Graph) | machine_id or managed_device_id |
intune_update_defender_signatures | eradicate | No | DeviceManagementManagedDevices.PrivilegedOperations.All (Graph) | machine_id or managed_device_id |
intune_expedite_quality_update | eradicate | Yes | WindowsUpdates.ReadWrite.All (Graph beta) | machine_id or managed_device_id, quality_update_id, days_until_forced_reboot (0–2) |
Steps
Check for duplicates before requesting
- Before filing a containment request, check what actions already exist on the incident:
- Web UI: inspect the Actions section of the deterministic incident summary at the top of
/incidents/<graph_id>. - MCP: call
list_actions { "incident": "<graph_id>" }.
- Web UI: inspect the Actions section of the deterministic incident summary at the top of
- If an equivalent action is already
pending_approval,approved_once,approved,runningorsucceeded, do not file a duplicate.
Preview an action against policy (optional)
- On
/policy(or viaPOST /api/actions/preview), enter thekind,paramsandincidentto see whetherPolicyEnginewould returnauto,needs_approvalorreject, along with exactpolicy_notes, whether two approvers are required, and whether typed target confirmation will be demanded. No database row or Microsoft API call is made.
Request an action
- As an analyst in the web app:
- Open
/incidents/<graph_id>and click Request action. - Pick the Kind (for example
isolate_deviceorrevoke_sessions), fill in the parameters, and write a concise Justification citing exact timestamps, KQL results or finding message IDs. - Click Submit.
- Open
- As an agent over MCP:
- Call
list_action_typesonce if you need parameter schemas. - Call
request_actionwithkind,params,justification,incident(required for every incident-scoped write), and optionalparent_id.
- Call
- Observe what happens immediately:
- Rejected by policy (
status: rejected): e.g. target matchesprotected_users,protected_devices,protected_appsorprotected_indicators, or the kind is indisabled. The board posts anaction_requestwith the rejection reason; no approval button appears. - Auto-approved (
status: approved → running → succeeded): only for non-destructive kinds listed inauto_approvewhose targets appear in incident evidence (for examplerun_av_scan,collect_investigation_package,add_incident_comment,tag_device). Executes immediately underblueboard-id-api(or records a dry run ifBROKER_EXECUTE=false). - Needs human approval (
status: pending_approval): the board posts anaction_requestin#containmentlinked to the incident, adds it to Approvals (/approvals), and the 15-second notifier alerts approvers via Teams, webhook and/or email.
- Rejected by policy (
Review and decide on Approvals

- Press
g aor click Approvals in the side rail (requires a human account holdingBoard.Approve). - For each pending request, check four things before deciding:
- Exact parameters (device ID, UPN/OID, SHA-1/SHA-256,
network_message_id, expiry days). - Policy notes: look for warnings such as "target not found in incident evidence" or "protected list checked by ID only".
- Incident evidence & deterministic summary: open the linked incident if anything looks ambiguous. Treat the agent's Justification as untrusted explanation — verify claims against findings and evidence.
- Expiry countdown: requests expire after
expiry_hours(default 4 hours) orexpiry_hours_by_kind[kind].
- Exact parameters (device ID, UPN/OID, SHA-1/SHA-256,
- Complete the decision:
- If the action kind is listed in
confirm_target, type the exact target identifier requested into the confirmation box. - Add an optional Decision note (for example "Confirmed AiTM session replay from 198.51.100.88").
- Click Approve or Deny. (Keyboard shortcuts intentionally cannot approve or deny an action.)
- If the action kind is listed in
- Two-approver actions (
require_two_approvers):- When the first human approver clicks Approve, the action moves to
approved_once. - blueboard records the first approval in
action_approvals, posts a status update, keeps the incident flagged on Queue and Approvals, and dispatches anaction.second_approval_needednotification. - A second distinct human with
Board.Approve(who is neither the requester nor the first approver) reviews and clicks Approve to move the action toapprovedand execute it.
- When the first human approver clicks Approve, the action moves to
Handle held actions after a broker pause
- If an admin paused the broker (Admin → Participants → Pause broker), approved actions stay in
approved(Held) and do not execute when the broker resumes. - After the admin clicks Resume broker, held actions appear at the top of Approvals with a Run now button (
POST /api/actions/{id}/run, accepting{ "confirm": "<target>" }ifconfirm_targetapplies). Any human approver other than the requester inspects the action and clicks Run now;Broker.RunNowAsyncre-checks expiry, typed confirmation andPolicyEngine.Assess(rejecting withaction.rejectedif the target became protected while held) before releasing it (action.released) for execution.
Dry-run week to live cutover
-
Every new deployment starts with
BROKER_EXECUTE=false. During your dry-run week, approvers decide real requests as normal; blueboard validates parameters, re-checks policy, records every approval, and posts[DRY RUN]action_resultmessages showing the exact Graph/MDE/Sentinel request that would have been sent. -
Review the Dry-run panel on Reports (
/reports), verify every action in a non-production tenant, and switch to live execution:BROKER_EXECUTE=true POLICY_FILE=policy.json ./infra/deploy.shdeploy.shrefusesBROKER_EXECUTE=truewithpolicy.example.jsonand prompts for explicit confirmation before enabling writes.
What blueboard checks
| Check | Error / refusal | Meaning |
|---|---|---|
| Self-approval attempt | you cannot approve your own action request (HTTP 403) | decided_by <> requested_by is enforced in SQL and Broker.DecideAsync. |
| Agent calls approve/deny | only humans can approve or deny actions (HTTP 403) | Board.Approve is stripped from app-only tokens in TokenValidator.MapRoles. |
| Second approval by same approver | a second distinct approver is required (HTTP 403) | action_approvals enforces distinct approver_id per action. |
| Wrong or missing typed confirmation | confirm_target mismatch (HTTP 400) | Re-type the exact target shown on the card. |
| Expired request | action request expired (HTTP 409) | File a fresh request_action with current evidence. |
| Policy tightened after request was filed | rejected on re-check (action.rejected_on_recheck) | Policy is re-evaluated at approval time; newly protected targets are blocked. |
| Too many pending actions on one incident | at most 10 pending actions per incident (HTTP 429) | Decide or deny existing pending actions before filing more. |
| Unknown or malformed parameter | 400 Bad Request with field message | Parameter schemas are checked both at request time and again right before execution. |
What is recorded in audit_log
action.requested(kind, params, policy outcome, policy notes, incident)action.approved_once(first approver, note)action.approved/action.denied(approver, note)action.rejected_on_recheck(when policy changed between request and decision)action.expired(when TTL passed before final approval)action.held/action.released/action.rejected(held during a broker pause, released by Run now, or rejected if the target became protected while held)action.succeeded/action.failed/action.dry_run/action.interrupted(execution outcome and Microsoft response IDs)
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Action fails with HTTP 403 from Graph or Defender | Required application permission not granted to blueboard-id-api or token not yet refreshed | Run ACTIONS="<kind>" ./infra/grant-permissions.sh … and restart the Function App after ~10 minutes. |
Action marked Outcome unknown (action.interrupted) | Function App crashed or timed out after calling Microsoft API (> 10 min in running) | Check Microsoft Defender Action Center / Entra Audit Logs directly; blueboard never blindly retries a running action. |
| Approve button is disabled or hidden | You requested the action yourself, or your account lacks Board.Approve | Ask another shift lead holding Board.Approve to review and decide. |
Related guides
- 07 Defender XDR and Microsoft Sentinel case walkthroughs, for exact action sequences by attack scenario.
- 09 Policy governance, starter profiles and simulator, for configuring
protected_*,require_two_approversandconfirm_target. - 11 Auditing, SOC metrics and Sentinel monitoring, for approval-burst and interrupted-action Sentinel detections.