Configuring Office 365 Connectors

This connector allows Stellar Cyber to collect data from external sources and add the records to the data lake.

Integrating Office 365 with Stellar Cyber provides real-time visibility into security events and alerts, enabling organizations to effectively monitor and respond to security incidents across their cloud and on-premise environments.

There must be one connector for every Microsoft account to be monitored.

Connector Overview: Office 365

Capabilities

  • Collect: Yes

  • Respond: No

  • Native Alerts Mapped: Yes

  • Runs on: DP

  • Interval: Configurable

Collected Data

Content Type

Index

Locating Records

Audit General

Audit Exchange

Audit Sharepoint

Audit Azure Active Directory

DLP All

Windows Events

 

msg_class:

office365_audit_general

office365_audit_exchange

office365_audit_sharepoint

office365_audit_azureactivedirectory

office365_dlp_all

msg_origin.source:

office365

msg_origin.vendor:

office365

msg_origin.category:

office_suite

Domain

<Authentication Endpoint>

where <Authentication Endpoint> is a variable from the configuration of this connector and will be one of the following, based on the Subscription Plan:

  • https://manage.office.com (Enterprise Plan)

  • https://manage-gcc.office.com (GCC Government Plan)

  • https://manage.office365.us (GCC High Government Plan)

  • https://manage.protection.apps.mil (DoD Government Plan)

Response Actions

N/A

Third Party Native Alert Integration Details

For the Audit General content type, Office 365 alerts contain events from the AlertTriggered operation, which are sent to the Alerts index.

The source records may also include related events in the AlertEntityGenerated operation. Some information (AlertEntityId and EntityType) from the AlertEntityGenerated operation is merged with the AlertTriggered operation for the same Alert ID. The information (AlertEntityId and EntityType) is stored in the event_summary field.

In addition, the AlertEntityGenerated operation can be queried in Original Records, which are sent to the Windows Event index.

For details, see Integration of Third Party Native Alerts.

For full alert integration of Office 365, including email-related alerts, the following licenses are required:

  • Microsoft 365 E5

  • Microsoft Defender for Office 365 P2 as an add-on to a non-E5 license

Required Credentials

  • Azure Active Directory App with permissions: ActivityFeed.Read, ActivityFeed.ReadDlp, ServiceHealth.Read

  • Directory ID, Application ID, API Access Key

Locating Records

Use the following to query for records:

  • msg_origin.source: office365

  • msg_class: office365_audit_general

To search the alerts in the Alerts index, use the query: msg_class: office365_audit_general AND Operation:AlertTriggered

To search the Original Records of the alerts in the Windows Event index, use the query: msg_class: office365_audit_general AND Operation:AlertTriggered AND Operation:AlertEntityGenerated

               Let us know if you find the above overview useful.

Adding an Office 365 Connector

To add an Office 365 connector:

  1. Enable the audit log
  2. Register the application
  3. Add the connector in Stellar Cyber
  4. Test the connector
  5. Verify ingestion

Enabling the Audit Log

Use one of the following options to enable auditing in your environment:

Use our example as a guideline, as you might be using a different software version.

Using the Compliance Center GUI to Enable Auditing

  1. Log into https://compliance.microsoft.com or https://https://portal.office.com/adminportal#/homepage > Compliance with administrative access.

  2. In the left navigation pane of the Microsoft 365 compliance center, click Audit.

  3. If auditing is not turned on for your organization, a banner is displayed prompting you start recording user and admin activity.

    Click the Start recording user and admin activity banner.

    It may take up to 60 minutes for the change to take effect.

Using PowerShell to Enable Auditing

To use PowerShell (from Windows 10/11) to turn on auditing:

  1. Locate on the search box on the taskbar and type powershell.

  2. From the list of displayed options, select Windows PowerShell or just PowerShell.

  3. Right-click on the menu item and select Run as administrator.

  4. Execute the following commands:

    Install-Module -Name ExchangeOnlineManagement
    Import-Module ExchangeOnlineManagement
    Connect-ExchangeOnline -UserPrincipalName <admin-username>
    Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true

Using Office.com to Enable Auditing

  1. Log in to https://portal.office.com.
  2. Click Admin.

  3. Under Admin centers click Security. The Security & Compliance page appears.

  4. Click Audit log search. If the Audit log search page appears, the audit log is already enabled and you are done.

    If the audit log is not enabled, the Enable audit log button appears.

  5. Click Enable audit log. The Azure audit log is now enabled.

Registering the Application

To register the application in Azure:

  1. Log in to the Azure Active Directory admin center at https://portal.azure.com. The Dashboard appears.

  2. From the far left side of the top menu bar, click to Show the Portal Menu.

  3. From the Portal Menu, click Azure Active Directory.

    The Azure Active Directory page appears.

  4. Click App registrations.

    The App registrations page appears.

  5. Click New registration.

    The Register an application page appears.

  6. Enter the Name.

  7. Choose a supported account type.

  8. Click Register. The registration is immediately created and the detail page appears.

  9. Copy the Application (client) ID and Directory (tenant) ID as noted in above. You will use them to configure the connector in Stellar Cyber.

  10. Click API permissions.

    The API permissions page appears.

  11. Click Add a permission. The Request API permissions screen appears.

  12. Click Office 365 Management APIs. The API Permissions dialog for this set is displayed.

  13. Expand the Applications Permission set, and request those shown below.

  14. If you are the Office 365 super admin, grant the permissions. Select the checkmark to Grant admin consent for <account name>.

    Otherwise, wait for the super admin to grant them.

    Make sure that the permissions are granted. If you add the connector before permissions are granted, the process fails and you have to start over.

  15. When the permissions are granted, click Certificates & secrets.

    The Certificates & secrets page appears.

  16. Click New client secret. The Add a client secret screen appears.

  17. Enter a Description.

  18. Choose an expiration.

  19. Click Add. The new secret is added and displayed under Client secrets.

  20. Copy the Value. You will use this as the API Access Key to configure the connector in Stellar Cyber.

Adding the Connector in Stellar Cyber

With the audit log enabled, the app registered, and the two IDs and secret handy, add the Office 365 connector in Stellar Cyber:

  1. Log in to Stellar Cyber.

  2. Click System | Integration | Connectors. The Connector Overview appears.

  3. Click Create. The General tab of the Add Connector screen appears. The information on this tab cannot be changed after you add the connector.

  4. Choose SaaS from the Category drop-down.

  5. Choose Office 365 from the Type drop-down.

  6. For this connector, the supported Function is Collect, which is enabled already.

  7. Enter a Name.

    This field does not accept multibyte characters.

  8. Choose a Tenant Name. The Interflow records created by this connector include this tenant name.

  9. Choose the device on which to run the connector.

    • Certain connectors can be run on either a Sensor or a Data Processor. The available devices are displayed in the Run On menu. If you want to associate your collector with a sensor, you must have configured that sensor prior to configuring the connector or you will not be able to select it during initial configuration. If you select Data Processor, you will need to associate the connector with a Data Analyzer profile as a separate step. That step is not required for a sensor, which is configured with only one possible profile.

    • If the device you're connecting to is on premises, we recommend you run on the local sensor. If you're connecting to a cloud service, we recommend you run on the DP.

  10. (Optional) When the Function is Collect, you can create Log Filters. For information, see Managing Log Filters.

  11. Click Next. The Configuration tab appears.

  12. Select the applicable Office365 Subscription Plan from the menu:

    • Enterprise Plan

    • GCC Government Plan

    • GCC High Government Plan

    • DoD Government Plan

    To learn about Office 365 government environments and customer eligibility for the Office 365 government plans, refer to the following Microsoft documentation: https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-platform-service-description/office-365-us-government/office-365-us-government.

  13. Select the Microsoft Authentication Endpoint you wish to use, the available selections are:

    • https://login.microsoftonline.us

    • https://login.microsoftonline.de

    • https://login.partner.microsoftonline.cn

    • https://login.microsoftonline.com

  14. Enter the Directory ID. This is the Directory (tenant) ID you copied when you performed the application registration.

  15. Enter the Application ID. This is the Application (client) ID you copied when you performed the application registration.

  16. Enter the API Access Key. This is Value string you copied from Certificates & secrets.

  17. Enter a Publisher ID. This ID is used to identify the application querying the API. If there are no rate limits for querying the API, you can leave this blank.

  18. Set the Interval (min). This is how often the logs are collected.

  19. Choose the Content Type you want to collect. The following logs are supported:

    • Audit Azure Active Directory

    • Audit Exchange

    • Audit General

    • Audit Sharepoint

    • DLP ALL

    The same content types are collected for all Office365 Subscription Plans.

  20. Click Next. The final confirmation tab appears.

  21. Click Submit.

    To pull data, a connector must be added to a Data Analyzer profile if it is running on the Data Processor.

  22. If you are adding rather than editing a connector with the Collect function enabled and you specified for it to run on a Data Processor, a dialog box now prompts you to add the connector to the default Data Analyzer profile. Click Cancel to leave it out of the default profile or click OK to add it to the default profile.

    • This prompt only occurs during the initial create connector process when Collect is enabled.

    • Certain connectors can be run on either a Sensor or a Data Processor, and some are best run on one versus the other. In any case, when the connector is run on a Data Processor, that connector must be included in a Data Analyzer profile. If you leave it out of the default profile, you must add it to another profile. You need the Administrator Root scope to add the connector to the Data Analyzer profile. If you do not have privileges to configure Data Analyzer profiles, a dialog displays recommending you ask your administrator to add it for you.

    • The first time you add a Collect connector to a profile, it pulls data immediately and then not again until the scheduled interval has elapsed. If the connector configuration dialog did not offer an option to set a specific interval, it is run every five minutes. Exceptions to this default interval are the Proofpoint on Demand (pulls data every 1 hour) and Azure Event Hub (continuously pulls data) connectors. The intervals for each connector are listed in the Connector Types & Functions topic.

    The Connector Overview appears.

The new connector is immediately active, but the Office 365 APIs might not be active, especially if this is the first time you've enabled the Office 365 audit logs. Wait at least 30 minutes before testing the connector so that Office 365 can complete its background tasks.

The connector collects logs every 5 minutes, but does not collect any historical logs.

Testing the Connector

If you've just added this connector, wait 30 minutes before testing.

When you add (or edit) a connector, we recommend that you run a test to validate the connectivity parameters you entered. (The test validates only the authentication / connectivity; it does not validate data flow).

  1. Click System | Integrations | Connectors. The Connector Overview appears.

  2. Locate the connector that you added, or modified, or that you want to test.

  3. Click Test at the right side of that row. The test runs immediately.

    Note that you may run only one test at a time.

Stellar Cyber conducts a basic connectivity test for the connector and reports a success or failure result. A successful test indicates that you entered all of the connector information correctly.

To aid troubleshooting your connector, the dialog remains open until you explicitly close it by using the X button. If the test fails, you can select the  button from the same row to review and correct issues.

The connector status is updated every five (5) minutes. A successful test clears the connector status, but if issues persist, the status reverts to failed after a minute.

Repeat the test as needed.

ClosedDisplay sample messages...

Success !

Failure with summary of issue:

Show More example detail:

 

 

 

If you see an error similar to below, verify that the appropriate permissions have been granted.

Verifying Ingestion

To verify ingestion:

  1. Click Investigate | Threat Hunting. The Interflow Search tab appears.
  2. Change the Indices to Windows Events or Alerts. The table immediately updates to show ingested Interflow records.