Skip to main content
Skip table of contents

Get Users Emails Grouped By Domain

Get a JSON object array containing input user emails grouped by domain

Implementation

System

Command Category

Cyber Utility

Tags

ARTIFACT EMAIL

Inputs

Parameter Name

Required/Optional

Description

Sample Data

Email Array

Optional

The input text array of user emails

JSON
[

    "user_1@schwarz.com",

    "user_2@schwarz.de",

    "user_3@mail.schwarz",

    "user_4@schwarz.com"

]

Domain Array

Optional

The array of domain to perform grouping

JSON
[
    "iso@schwarz.com",
    "iso@schwarz.de",
    "iso@mail.schwarz"
]

Output

Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

JSON
Successful
Context Data

The response data from the utility command.

SAMPLE DATA

JSON
[
    {
        "domain": "iso@schwarz.com",
        "users": [
            {
                "email": "user_1@schwarz.com"
            },
            {
                "email": "user_4@schwarz.com"
            }
        ]
    },
    {
        "domain": "iso@schwarz.de",
        "users": [
            {
                "email": "user_2@schwarz.de"
            }
        ]
    },
    {
        "domain": "iso@mail.schwarz",
        "users": [
            {
                "email": "user_3@schwarz.de"
            }
        ]
    }
]

Remote Command API

The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.

Request

POST

CODE
https:/{base_url}/{api_namespace}/api/Command/EmailGroupByDomain

Headers

Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.

Request Body

JSON
{
  "Username": <Username here>,
  "Site": <Site here>,
  "CommandParams": {
    "Email Array": [
      <Email 1 here>,
      <Email 2 here>,
      <Email 3 here>,
      <Email 4 here>
    ],
    "Domain Array": [
      <Domain 1 here>,
      <Domain 2 here>,
      <Domain 3 here>
    ]
  }
}

Body Parameters

Parameter Name

Type

Required/Optional

Description

Username

String

Required

The username of your D3 SOAR account.

Site

String

Required

The D3 SOAR site to run the remote command.

Email Array

Text Array

Optional

The input text array of user emails

Domain Array

Text Array

Optional

The array of domain to perform grouping

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "Email Array": [
      "user_1@schwarz.com",
      "user_2@schwarz.de",
      "user_3@mail.schwarz",
      "user_4@schwarz.com"
    ],
    "Domain Array": [
      "iso@schwarz.com",
      "iso@schwarz.de",
      "iso@mail.schwarz"
    ]
  }
}

Response

Response Fields

Field Name

Type

Description

error

Text

The error message if the API request has failed.

returnData

Text

The return data from the API request.

contextData

JSON Array

The context data from the API request.

Sample Response

JSON
{
    "error": "",
    "returnData": "Successful",
    "contextData": [
        {
            "domain": "iso@schwarz.com",
            "users": [
                {
                    "email": "user_1@schwarz.com"
                },
                {
                    "email": "user_4@schwarz.com"
                }
            ]
        },
        {
            "domain": "iso@schwarz.de",
            "users": [
                {
                    "email": "user_2@schwarz.de"
                }
            ]
        },
        {
            "domain": "iso@mail.schwarz",
            "users": [
                {
                    "email": "user_3@schwarz.de"
                }
            ]
        }
    ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.