Configuring email destinations

You can send information from a connection source to a set of email addresses using Microsoft 365 email resources or through an SMTP server. You can either include the results in the email body, or create an attachment.

Note: Microsoft 365 was previously known as Office 365 (O365).

Prerequisites for Microsoft 365 destinations

To configure a connection destination to send email through Microsoft 365, ensure you complete the following prerequisites:

  • For a walkthrough of configuration prerequisites, Microsoft Azure configuration, email server profile configuration, and connection configuration, see Tanium Community: Use Tanium Connect to Send Microsoft Office 365 Emails using Modern Authentication.

  • You must have a Microsoft 365 Outlook email address associated with a Microsoft Entra ID (formerly Azure Active Directory) user.

  • You must create a Microsoft Entra ID application and service principal, and assign the Mail.Send and User.Read permissions to the application, to send an email with an attachment up to a total of 3 MB (this includes the body of the email plus the attachment). If you want to limit the application scope, create an application access policy and associate it with a mail-enabled security group containing at least one user. For more information, see Microsoft Entra documentation: Create a Microsoft Entra application and service principal that can access resources and Microsoft Graph documentation: Configure ApplicationAccessPolicy.

    • You must also generate a Microsoft Entra ID application client secret. For more information, see Microsoft Entra documentation: Option 3: Create a new client secret.

    • You must also assign the Mail.Send and User.Read permissions to the application to send emails with attachments up to a total of 3 MB. For more information, see Microsoft Entra documentation: Assign a role to the application.

      Note: If a connection run generates no data, no email is sent. However, if you select a saved question source and clear Hide No Results, an email is sent per connection run, regardless of whether data is available.
    • If you want to enable sending emails with attachments greater than 3 MB and up to 150 MB (subject to your Microsoft 365 attachment settings), you can assign the Mail.ReadWrite permission to the Microsoft Entra ID application. If you assign this permission, you must allow traffic to outlook.office.com over port 443/TCP and outlook.office365.com over port 443/TCP.

      Important: Attachments larger than 3 MB are currently not supported for Tanium Cloud for U.S. Government customers. Connect uses the Microsoft createUploadSession API to manage attachments for Microsoft 365 email uploads. The API has a known issue with attachments larger than 3 MB. Tanium Cloud for U.S. Government customers who try to send an email with an attachment larger than 3 MB might receive a MS_GRAPH_STATUS_CODE 401 large_attachment response that contains an error message similar to caused by unexpected status code 401 from ms-graph. For more information about the createUploadSession API and the known issue, see Microsoft Graph documentation: attachment: createUploadSession.
      Note: The Mail.ReadWrite permission only permits a larger attachment size; the body of the email must never exceed 3 MB.
      Note: For the best results, if you assign the Mail.ReadWrite permission, create an access policy and limit Microsoft Entra ID application access to one user. For more information, see Microsoft Graph documentation: Limiting application permissions to specific Exchange Online mailboxes.
  • The Email (O365 & SMTP) destination requires an email server profile on the Tanium Server. You can configure an email server profile through the Connect workbench in Tanium Console.

    • To configure an email server profile in Tanium Console, you must have a role with the Tanium Email Config write permission. The predefined Connect Operator and Connect Administrator roles in Connect have this permission. Sending an email requires the user that configures the connection to have permission to the content set to which you assign the email server profile. For more information about predefined roles in Connect, see User role requirements. For information about configuring custom roles, see Managing access permissions through roles

    Note: If you delete an email server profile configuration that is referenced by a scheduled connection, future scheduled instances of that connection fail. For more information, see Issue: Emails to Microsoft 365 destinations fail to send.
  • The email server profile uses login.microsoftonline.com for authentication to the graph.microsoft.com host over port 443/TCP. If you want to change the host from graph.microsoft.com, Contact Tanium Support.

  • Configure your network allow list to allow traffic outbound from your Tanium Module Server to the following Microsoft 365 URLs and enable access for Microsoft 365 mail resources:

For more information about how to configure an email server profile, see Configure email server profile settings for Microsoft 365.

Prerequisites for SMTP destinations

To configure a connection destination to send email through SMTP, ensure you complete the following prerequisites:

  • The Email (O365 & SMTP) destination requires an email server profile on the Tanium Server. You can configure an email server profile through the Connect workbench in Tanium Console.

    • To configure an email server profile in Tanium Console, you must have a role with the Tanium Email Config write permission. The predefined Connect Operator and Connect Administrator roles in Connect have this permission. Sending an email requires the user that configures the connection to have permission to the content set to which you assign the email server profile. For more information about predefined roles in Connect, see User role requirements. For information about configuring custom roles, see Managing access permissions through roles

    Note: If you delete an email server profile configuration that is referenced by a scheduled connection, future scheduled instances of that connection fail.
  • Configure your network allow list to allow traffic outbound from your Tanium Module Server to the SMTP server.

    • To use Google Mail as an SMTP server, allow traffic to smtp.google.com.

  • You must have email addresses to send and receive email results.

  • Gather information about your mail server, including host, port, certificate, user name, password.

Note: Standard TCP ports for secure email using SMTP include 465 and 587. Do not send unencrypted data over TCP port 25 outbound.

Specify general connection information

  1. From the Main menu, go to Modules > Connect > Overview. Go to the Connections section and click Create Connection.
  2. Enter a name and description for the connection.
  3. (Optional) In the General Information section, expand Advanced to configure the following settings:
    Log Level

    By default, Log Level is set to Information. To reduce the amount of logging, you can set Log Level to Warning, Error, or Fatal.

    Example Log Level setting
    Override Log Level

    If you are debugging the connection, select Override Log Level to set a Temporary Log Level (such as Trace or Debug) on this connection for a selected Number of Runs (up to 24). A scheduled or manual connection run, once started, counts towards the number of runs, regardless of the connection status. After the number of runs elapses, the logging for this connection returns to the Log Level you selected to prevent finer-grained logging from consuming additional resources for an indefinite number of runs.

    Minimum Pass Percentage

    Minimum percentage of the expected rows that must be processed for the connection to succeed.

    Memory Ceiling (GB)

    Maximum memory for the node process to run the connection. This defaults to 1 GB per connection, and cannot exceed the global maximum sum of memory for all running connections (by default, 8 GB). Increase this setting if a connection frequently exhibits out of memory errors while running.

    Note: If the sum of simultaneously scheduled connection Memory Ceiling values exceed the global Memory Ceiling, connections run until the global Memory Ceiling is reached, then any remaining connections enter a waiting queue if you select the Queue Connections configuration setting, or fail if you clear the Queue Connections configuration setting.

Configure the connection source

The connection source determines what data you are sending to the destination. This data is usually information from Tanium, such as a saved question, question log, client status, or event. The settings vary depending on which source you choose.

For more information about available connection sources, see Connection sources.

Figure 1. Connection source settings
Connection source settings
Note:

If a Tanium solution or source shows Critical state-critical, the installed solution does not meet the minimum required version for proper compatibility and functionality. Upgrade the solution to the minimum required version or later.

Note: After you create a connection, you cannot update the connection source type, only the source configuration. If you want to change the source type, create a new connection.

Configure the email results destination

Note: After you create a connection, you cannot update the connection destination type, only the destination configuration. If you want to change the destination, create a new connection.
  1. For Destination, select Email (O365 & SMTP).
  2. Provide a name for the destination. Options include:
    • Create a new destination: Specify a unique name to save the configuration information as a new destination. Select New and then enter a Destination Name.

    • Copy an existing destination: Select New, and then click Copy Settings. Select a destination, click Apply, and update the Destination Name.

    • Reuse an existing destination: Select Existing, and then select a Destination Name.

      Note: Configure a unique destination per connection. If you edit the settings for a shared destination for one connection, any other connections that use the shared destination are affected, and connection runs might fail.
  3. Select an Email Server Profile from the drop-down list.
  4. Provide information about the email Subject, To Addresses, Cc Addresses, and Bcc Addresses.

    The Subject field supports variable substitution, as listed in Reference: Variables.

    Example Connect configuration for an email destination through Microsoft 365
  5. (Optional) Specify attachment settings.

    The Attachment Filename field supports variable substitution, as listed in Reference: Variables.

    Example attachment settings for an email destination through Microsoft 365
    • Attachment is selected by default. Enter up to 5000 characters of email Body text included with each email. Specify a file name and file extension in the Attachment Filename. The file extension does not need to match the format option you select in the Format section. Note the option that you select in the Format section does not add or change the file extension. Select a Filename Timestamp Format if you want to append a timestamp to the file name.

      Note: The Tanium Reporting source requires selecting Attachment.
    • You can compress the attachment into a zip or gzip file. If you select a compression method, the file extension for the compression method is automatically added to the end of the file name.

Configure filters

(Optional) In the Configure Output > Filters section, you can specify filters to modify the data that you are getting from your connection source before it is sent to the destination.

For more information about the types of filters you can configure, see Reference: Filtering options.

Format data for email

You can choose from any of the available formats for your email. The data is sent in an email attachment by default.

If you want to have the data in the body of the email instead of attaching a file to the email, edit the email destination settings to clear Attachment.

You can choose the columns that appear in the resulting email.

Note: If the data format supports row delimiter characters, update the characters to ensure that individual rows are sent in a format that the destination can parse. You can define one or more of \n (new line), \r (carriage return), and \t (tab).

In the Configure Output > Columns section, you can change the Destination Label of each column and Value Type to force the column to be a String, Numeric, or Date/Time value.

Figure 2. Columns section with Destination Label and Value Type fields
Columns section with Destination Label and Value Type fields

If you choose Numeric for the value, you can specify a default value that is used if the data cannot be coerced into a numeric value. You can specify any negative or positive number.

If you choose Date/Time for the value, specify the format that you want to use for the column. For more information about how to use a variable, see Time stamp variables.

For more information about column customizations, see Reference: Column customizations.

Schedule the connection

Connections can run at a highly configurable time interval, such as multiple times per hour, day, week, or month.

Important: Connections scheduled to run during an upgrade of Connect, or any Tanium solution configured as a connection source, might be interrupted or fail. Schedule your connections to run at a different time than your Tanium upgrades.
Note: If you do not enable the schedule, the connection only runs when you manually run it, unless you configure an Event source. Connections with Event sources only run when a configured event is detected, and cannot be scheduled or manually run.

Use the Schedule section to update the schedule:

  • Select Enable schedule.

  • In the Schedule Type, select Basic to build a schedule with the provided controls.

    Example connection schedule settings
  • To view or edit the cron expression directly, select Advanced - Define as a Cron Expression, and use the Advanced field to edit the cron expression.

    Example cron settings
Note: If a user that owns a scheduled connection is deleted, future scheduled instances of that connection do not run. For more information, see Issue: Scheduled connection owned by a deleted user no longer runs.

For more information about cron syntax, see Reference: Cron syntax for Connect.

Enable listening for an event

Connections with Event sources only run when a configured event is detected, and cannot be scheduled or manually run.

Use the Enablement section to send data when a configured event is detected:

  • Select Listen for this Event.

Save and verify connection

  1. After you enter the details for the connection, click Save.
    Tip: To save the connection and immediately run the connection, click Run and Save.

    If needed, resolve any errors or missing information. After the connection creates successfully, the connection details appear.

  2. To view details when the connection runs, click the Logs tab.
  3. To view an individual run log, expand the row table. For more information about how to resolve errors, see Troubleshooting.