Respond to a compromised-user report with Teams approval
Check Entra ID Protection for a reported user, get Teams approval, then revoke sessions, block the source IP and comment on the alert.
respond-to-a-compromised-user-report-with-teams-approval-1.0.0.json
Sanitized by the pipeline and shipped inactive. Follow the before turning it on.
Needs a connector that isn't on the Content Hub
microsoft-entra-id-v2, microsoft-graph-api-security-v2 - you'll need to obtain this custom connector (or build an equivalent) before it will run.
One playbook for the "a user may be compromised" report. It checks Entra ID Protection for the reported account and, if the user is at risk or confirmed compromised, asks a person to approve the response through a Microsoft Teams approval card. On approval it revokes the user's active sessions and appends the reported source IP to an existing IP named location in Conditional Access. Both outcomes write a close-out comment on the security alert that carries the report. If the account is not at risk, the playbook ends with no_action_taken and changes nothing.
The risky-user lookup runs with errors ignored, so a tenant without Identity Protection P1 ends the playbook cleanly instead of failing.
Inputs: approver (Teams recipient for the approval card: a conversation id or a user principal name), reported_ip (source IP to block), named_location_name (an existing IP named location; the playbook appends to it and does not create one), alert_id (Microsoft Graph security alert id for the close-out comment). Outputs: outcome (contained, contained_no_block, not_approved or no_action_taken), risk_user, revoked, blocked_ip, named_location.
Connectors it needs:
- microsoft-entra-id-v2 (Entra ID item in this catalogue, version 1.0.1): risky users, revoke sessions, named locations, block IPs.
- microsoft-graph-api-security-v2: the add_alert_comment close-out steps. It is not in this item's set and is not on the FortiSOAR content hub; get it from its own source before installing.
- microsoft-teams: the approval card. Install it from the FortiSOAR connector hub.
Live prerequisites: the Entra ID app registration needs User.RevokeSessions.All, IdentityRiskyUser.Read.All (Entra ID P1 or P2), Policy.Read.All and Policy.ReadWrite.ConditionalAccess. The IP named location must already exist. Run it from the Execute menu with the report details, or from a schedule for the sweep variant.
Not live-tested:
- Branch contained (approved, IP blocked): the run never reached the approval gate. Reason: Entra ID P1 tenant, no risk detections, so a scratch account is never flagged at risk and the risky-user sweep never targets it.
- Branch not_approved (rejected at approval): same reason as contained.
- Branch contained_no_block (approved, IP block skipped): same reason as contained.
- Because the approval gate was never reached, the Teams approval card and the close-out comment steps are also not live-tested.
- Live-tested branch: no_action_taken, which finished on 8.0.1.