Skip to main content

Search And Delete Emails - Generic v2

This Playbook is part of the Common Playbooks Pack.#

Supported versions

Available on Cortex XSOAR (versions 6.1.0 and later), Cortex XSIAM, and Cortex XPANSE.

This playbook searches and deletes emails with similar attributes of a malicious email using one of the following integrations: EWS Microsoft Graph Security Gmail Agari Phishing Defense.

Dependencies#

This playbook uses the following sub-playbooks, integrations, and scripts.

Sub-playbooks#

  • Search And Delete Emails - Microsoft Graph Security
  • Search And Delete Emails - EWS
  • Search And Delete Emails - Gmail

Integrations#

  • Agari Phishing Defense

Scripts#

  • DeleteContext
  • GetTime
  • Set

Commands#

  • apd-remediate-message

Playbook Inputs#


NameDescriptionDefault ValueRequired
FromThe value of the malicious email's "From" attribute.incident.emailfromOptional
SubjectThe value of the malicious email's "Subject" attribute.incident.emailsubjectOptional
AttachmentNameThe value of the malicious email's "AttachmentName" attribute.incident.attachmentnameOptional
SearchAndDeleteIntegrationThe integration in which to run the search and delete action. Can be MS Graph, Gmail, EWS, or Agari Phishing Defense.Required
SearchThisWeekWhether to limit the search to the current week. Disabling this may increase search scope, execution time, and risk of timeout for large mailboxes.trueOptional
MsgCaseUsed only with Microsoft Graph Security. The eDiscovery case name to use. Looked up by name and created if missing.XSOAR Auto PhishingRequired
MsgKQLUsed only with Microsoft Graph Security. KQL query identifying the emails to search and delete. Built automatically from the From, Subject, and AttachmentName inputs if left empty.Optional
MsgRecipientsUsed only with Microsoft Graph Security. CSV of recipient email addresses to scope the search when MsgMailboxScope is recipientsOnly.incident.emailtoOptional
MsgMailboxScopeUsed only with Microsoft Graph Security. Determines which mailboxes to search. Use recipientsOnly to limit to specific recipients, allTenantMailboxes to search the entire tenant.Optional
MsgDeleteTypeUsed only with Microsoft Graph Security. The delete type to perform on the search results. Possible values are Hard or Soft, or leave empty to select manually (Hard = unrecoverable, Soft = recoverable).Optional
MsgMailboxExclusionUsed only with Microsoft Graph Security. CSV of mailboxes to exclude from the search. Honored only when MsgMailboxScope is allTenantMailboxes. Note: exclusion works at the message level, not the mailbox level โ€” see subplaybook description for details.Optional

Playbook Outputs#


There are no outputs for this playbook.

Playbook Image#


Search And Delete Emails - Generic v2