# Darktrace Email

In this guide, you will create an API token in Darktrace and instantiate a Radiant Security email connector to pull suspicious emails for triaging.

At the end of this configuration, you will provide Radiant Security with these values:

* **Your Darktrace URL**

{% hint style="warning" %}
**Important note**: The domain should be in the following form `https://xxxxxx.cloud.darktrace.com`.
{% endhint %}

* **Public Token**
* **Private Token**
* **Anomaly Score Threshold**

### Prerequisites

* [ ] Admin access to the DarkTrace Threat Visualizer

### Create a local user

Darktrace API tokens are user-specific and available only for local users created directly within the Darktrace Threat Visualizer. This means API tokens are not supported for users authenticated via LDAP or SAML SSO. \
\
The following steps guide you through creating a local user and generating API tokens for integration with Radiant Security.

If you already have a local Admin user, use that account to complete the steps. Otherwise, use your regular Admin-level account.

1. On the Threat Visualizer of the instance from which you wish to request data, click **Menu** and then click **Admin > Permissions Admin**.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FFIX3EZrjOsviHuY9XZwn%2FDarkTrace%20Email_01.png?alt=media&#x26;token=8f82f175-3076-4f14-8aae-2267e0fdf535" alt="" width="516"><figcaption></figcaption></figure></div>
2. Click the **Created Accounts** tab.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FUwocz6untgS4hyFDFi28%2FDarkTrace%20Email_02.png?alt=media&#x26;token=fcc7672d-aee3-41ca-aeb5-870e29279ff0" alt="" width="297"><figcaption></figcaption></figure></div>
3. On the left side, click **Create new user**.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FlAxetkt52irmbvQ4woMG%2FDarkTrace%20Email_03.png?alt=media&#x26;token=4c6ea0b7-907a-4d01-9533-d8263a8e2b94" alt="" width="516"><figcaption></figcaption></figure></div>
4. Give the user a recognizable **Username** (e.g. `radiant_connector` ) and a **Password**.
5. Click **User Templates.**<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FyXzaXyWjAEHbB6JdrfEm%2FDarkTrace%20Email_04.png?alt=media&#x26;token=65e8bd95-19f9-42a4-a1eb-617c3eb0f4f6" alt=""><figcaption></figcaption></figure></div>
6. For **Select a user template**, select **Administrator**.
7. Click **Threat Tray Behavior Categories** to go to the next step.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2F8sx1s5aHsStjCvpOWAIU%2FDarkTrace%20Email_05.png?alt=media&#x26;token=1940deeb-c57f-4a68-98d3-45b13980786a" alt=""><figcaption></figcaption></figure></div>
8. Keep all default settings for **Threat Tray Behavior Categories** unchanged and then click **Flags.**<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FAX7WtrIHPiJHkhTadSdn%2FDarkTrace%20Email_06.png?alt=media&#x26;token=6efdaaec-416a-45bb-abd4-eddaaacaa20b" alt=""><figcaption></figcaption></figure></div>
9. Toggle the **API Access** selector to **Yes**.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FVMqNW1BnA9nPdt5PSt3B%2FDarkTrace%20Email_07.png?alt=media&#x26;token=5669debc-6f9c-453e-b1d2-2e60b48ed1b3" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
**Note**: If this selector cannot be changed, keep proceeding with the user creation. The next section, [**Troubleshoot users with no API Access**](#troubleshoot-users-with-no-api-access), will guide you on troubleshooting this.
{% endhint %}

10. Add this user to the **Darktrace Admins Group**.
11. Click **Add Threat Visualizer permissions**.<br>

    <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2F6uqfwko2vgh58AbPSgXs%2FDarkTrace%20Email_08.png?alt=media&#x26;token=d2fd19d2-4dd0-4930-a4e8-93d142b2d1fa" alt=""><figcaption></figcaption></figure></div>
12. Leave the next setup steps unchanged by clicking the proceeding buttons.
13. In the **Summary** page, click **Update user** to save changes.

### Troubleshoot users with no API access

If you weren’t able to toggle the API access in step 9, then you must contact DarkTrace support. In most cases, this happens because the API was never used before and it can be quickly resolved. After contacting support, all icons in the **Flags** column should be green for the newly created user.<br>

<div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FNoqxfpCqeEU1zNqy1kni%2FDarkTrace%20Email_09.png?alt=media&#x26;token=217deee1-783b-48e6-9636-70320805854e" alt="" width="263"><figcaption></figcaption></figure></div>

### Generate the API token

1. Log in to Threat Visualizer with the user created previously.
2. Click **Account Settings** from the main menu.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FmK6yq27TBPkqFwLPNQia%2FDarkTrace%20Email_10.png?alt=media&#x26;token=e3fc73c6-c969-4609-ae8e-d3fb77895d6b" alt=""><figcaption></figcaption></figure></div>
3. Click the **API Access** button.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FBz8N1OlCP9pixqUVOYqa%2FDarkTrace_Email_11.png?alt=media&#x26;token=5b711914-c178-4a96-820b-152b51e7ee58" alt=""><figcaption></figcaption></figure></div>
4. In the pop-up, click **New**. A **Public** and **Private** **Token** will appear.<br>

   <div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2F5kPl6a0dML4gcdfoyAtF%2FDarkTrace_Email_12.png?alt=media&#x26;token=887eb4fb-417b-41ff-8fea-6f8c41e341a2" alt="" width="516"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
**Important note**: Ensure you copy the token values as you won’t be able to retrieve the **Private** **Token** again. You will need to provide these values to Radiant Security at the end of the configuration.
{% endhint %}

### Add the credentials in Radiant Security

1. Log in to [Radiant Security](https://app.radiantsecurity.ai/).
2. From the navigation menu, select **Settings** > **Credentials** and click **+ Add Credential**.
3. Search for and select the **Darktrace API** option from the list and then click **Configure Credential.**
4. Give the credential an identifiable name (e.g. `Darktrace <user> API Tokens`) and add the required fields:
   * **Tenant URL**: Your Darktrace Console URL, it will look like `https://name.cloud.darktrace.com`
   * **Public Token**: 40 digit Public Token copied in the previous step.
   * **Private Token**: 40 digit Private Token copied in the previous step.
   * **Anomaly Score Threshold:** This value ranges from 0 to 100 and represents the Antigena Email Score assigned by Darktrace to each analyzed email.

     * A threshold of 0 means every email will be triaged by Radiant.
     * A threshold of 100 means only emails that Darktrace deems highly likely to be malicious will be triaged.

     A good starting value is 80 because it avoids triaging all emails while ensuring those with lower confidence scores by Darktrace still undergo further analysis.

### Add the data connector in Radiant Security

1. From the navigation menu, select **Settings** > **Data Connectors** and click **+ Add Connector**.
2. Search for and select the **Darktrace API** option and then click **Data Feeds**.
3. Select **Darktrace Email** **Alerts** and click **Credentials.**
4. Select the credentials created previously and click **Add Connector**.<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.radiantsecurity.ai/radiant-connectors/data-connectors/darktrace-email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
