---
sourceDocument: Australia Security Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/security-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Security Management

ft:clusterId :

    - security

bundleId :

    - security

workflow :

    - Technology


---

# Create Compliance Search Action

# Create Compliance Search Action {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The Create Compliance Search action creates a compliance search for emails in the designated Exchange server(s) using the search queries defined and returns the name of compliance search created.

## Input variables {#get-email-details-from-exch-server__section_alh_hfm_3z}

Input variables determine the initial behavior of the action.
{#get-email-details-from-exch-server__table_pgm_tfy_jr__entry__2}

| Variable | Description |
|-|-|
| search_query | Mandatory search query used to find emails in the Exchange Server across all mailboxes. |
| exchange Location | Mandatory location field used to search across location defined. Values are: * All * Name of specific mailbox {#get-email-details-from-exch-server__ul_fqz_12f_jsb} |
| targetId | Mandatory target host identifier field where the Exchange Server is located. |
[ ]

{#get-email-details-from-exch-server__table_pgm_tfy_jr}

## Output variables {#get-email-details-from-exch-server__section_cw4_gsb_v1b}

The output variables contain data that can be used in subsequent actions.
{#get-email-details-from-exch-server__table_bnj_jfy_jr__entry__2}

| Variable | Description |
|-|-|
| response | Name of the compliance search created. |
[Table 1. Output variables]

{#get-email-details-from-exch-server__table_bnj_jfy_jr}

## Exit Conditions {#get-email-details-from-exch-server__section_w4g_nsb_v1b}

Possible exit conditions for this action are:
{#get-email-details-from-exch-server__table_x4g_nsb_v1b__entry__2}

| Variable | Description |
|-|-|
| Search Creation Failed | When search creation fails due to exception in exchange server. |
| Search Created Successfully | When search creation is successful. |
| Search Creation Failed due to a Parsing Error | When search creation fails due to parsing issue. |
| Error | When exception occurs in flow action. |
[Table 2. Exit Conditions]

{#get-email-details-from-exch-server__table_x4g_nsb_v1b}

