# Microsoft 365 / Microsoft Defender

## Microsoft 365 / Microsoft Defender

The Dropzone AI platform integrates with Entra ID, Exchange Online, and Microsoft Defender via the Microsoft Graph API. This document describes how to set up API credentials and install them into the Dropzone platform.

### Integration Overview

To enable these integrations you will perform the following actions:

* Register a new application in Microsoft Entra Admin Center
* Locate your Client ID, Tenant ID, and create a Client Secret
* Enable Dropzone Certificate Credentials
* Assign necessary API permissions to the application
* Install the credentials into your Dropzone tenant (Data Source and Alert Source)
* Select integration parameters, such as which alert types to sync

See the [Microsoft Integrations](https://docs.dropzone.ai/integrations/alert/ms_alert) page for instructions on how to register a new application, locate your Client ID and Tenant ID, and create a Client Secret.

## Set Application Permissions

General instructions on how to assign API permissions to the application can be found in the [Microsoft Integrations](https://docs.dropzone.ai/integrations/alert/ms_alert) page.

MS 365/MS Defender can utilize the following APIs:

| API                                   | Purpose                                                                                                                                                              |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Microsoft Graph                       | Required for the integration to function                                                                                                                             |
| Microsoft Cloud Apps Security.        | Required to query investigations from Microsoft Cloud Apps. When enabled, Dropzone is able to analyze cloud apps events                                              |
| Windows Defender ATP - Live Response. | Required to extract quarantined files from Defender alerts. When enabled, Dropzone is able to independently analyze the files which will improve conclusion accuracy |
| Office 365 Exchange Online Management | Required to enable Office 365 Exchange Online Management, specifically to support retrieving quarantined emails during phishing analysis                             |

## Microsoft Graph Permissions

* In the API permissions page, click "Add a permission"
* Under the Microsoft API header, select "Microsoft Graph"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-c768b518ace85f39c45177fdc310a86a2033de74%2Fmssentinel-api-10-1.png?alt=media" alt=""><figcaption><p>Select Microsoft Graph</p></figcaption></figure>

* Click "Application Permissions"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-d7a882955b75717e5225ffbc1f089bb9e691bf7d%2Fmsgraph-api-application-perms.png?alt=media" alt=""><figcaption><p>Select Application Permissions</p></figcaption></figure>

Add the following permissions:

| Permission                    | Purpose                                                                                                                | Used By                                     |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| AuditLog.Read.All             | Retrieve audit information such as user MFA and administrator access status, for alert investigation and chat          | Data Source Integration                     |
| Calendars.Read                | Allow access to Microsoft Calendar, for use in investigations to determine user OOO / travel status                    | Data Source Integration - Calendar Features |
| Calendars.ReadBasic.All       | Retrieve basic calendar information for use in investigations to determine user OOO / travel status                    | Data Source Integration - Calendar Features |
| MailboxSettings.Read          | Retrieve mailbox settings, such as OOO or vacation status                                                              | Data Source Integration - Calendar Features |
| Presence.Read.All             | Retrieves presence information, such as availability status, location, etc                                             | Data Source Integration - Calendar Features |
| Directory.Read.All            | Retrieve directory information such as users, group membership, directory roles, etc, for alert investigation and chat | Data Source Integration                     |
| Mail.Read                     | Retrieve phishing emails for analysis; retrieve phishing alerts in some configurations                                 | Alert Source and Data Source Integrations   |
| ThreatHunting.Read.All        | Investigating Microsoft Defender alerts                                                                                | Alert Source Integration                    |
| SecurityAlert.Read.All        | Pulling Microsoft Defender alerts                                                                                      | Alert Source Integration                    |
| SecurityIncident.Read.All     | Pulling Microsoft Defender alerts                                                                                      | Alert Source Integration                    |
| ThreatSubmission.Read.All     | Pulling Phishing Alerts                                                                                                | Alert Source Integration                    |
| User.Read.All                 | Allow Dropzone to read all user profile properties when investigating suspicious alerts                                | Remediator Integration                      |
| User.RevokeSessions.All       | Allow Dropzone to revoke user sessions of users indicated in suspicious alerts                                         | Remediator Integration                      |
| User.EnableDisableAccount.All | Allow Dropzone to suspend accounts indicated in suspicious alerts                                                      | Remediator Integration                      |

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-2ea0c4cedda1256cc5c1f353424bdb96db6c5fba%2Fmsgraph-permissions-checkbox.png?alt=media" alt=""><figcaption><p>Example - adding the "User.Read.All" permission</p></figcaption></figure>

* Once done selecting all the permissions, click "Add permissions"

{% hint style="info" %}
Some of these permissions are only necessary for the Data Source and Remediator integrations. If you don't intend to perform those integration, you may ignore them.

Enabling Dropzone's Data Source Calendar Features is optional.
{% endhint %}

* Click "Grant admin consent for \[mycompany.net]"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-ca7be8f024f4476706c280faf8aa2aa448f3e1cb%2Fmssentinel-api-12-1.png?alt=media" alt=""><figcaption><p>Grant admin consent</p></figcaption></figure>

* Click "Yes"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-e314df457fd222cf925c1bfed30e2f012e793d49%2Fmssentinel-api-13-1.png?alt=media" alt=""><figcaption><p>Grant admin consent</p></figcaption></figure>

## Microsoft Cloud Apps Security Permissions

* In the API permissions page, click "Add a permission"
* Navigate to "APIs my organization uses"
* Type "Microsoft Cloud App Security" in the search bar

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-103784ed7d80ebb9592d016df369838927287868%2Fmsdefender-cloud-apps.png?alt=media" alt=""><figcaption><p>Microsoft Cloud App Security</p></figcaption></figure>

* Click "Microsoft Cloud App Security"
* Click "Application permissions"

Add the following permissions:

| Permission         | Purpose                       |
| ------------------ | ----------------------------- |
| investigation.read | Read Cloud App investigations |

* Once done selecting all the permissions, click "Add permissions"
* Click "Grant admin consent for \[mycompany.net]"
* Click "Yes"

## Windows Defender ATP - Live Response

* In the API permissions page, click "Add a permission"
* Navigate to "APIs my organization uses"
* Type "WindowsDefenderATP" in the search bar

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-156000409ab45310fc5f6f7aa2c7309afc29062b%2Fmsgraph-windows-defender-atp.png?alt=media" alt=""><figcaption><p>WindowsDefenderATP</p></figcaption></figure>

* Click "WindowsDefenderATP"
* Click "Application permissions"

Add the following permissions:

| Permission           | Purpose                                                                              |
| -------------------- | ------------------------------------------------------------------------------------ |
| File.Read.All        | Read file profiles. Note that this is different from the "Files.Read.All" permission |
| Library.Manage       | Extract quarantined files for analysis                                               |
| Machine.LiveResponse | Extract quarantined files for analysis                                               |
| Machine.Read.All     | Read machine details                                                                 |

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-c31dd5f02fb560775b8e7a3c92405c1598688b0a%2Fmsgraph-windows-defender-atp-file.read.all.png?alt=media" alt=""><figcaption><p>Example - adding the "File.Read.All" permission</p></figcaption></figure>

* Once done selecting all the permissions, click "Add permissions"
* Click "Grant admin consent for \[mycompany.net]"
* Click "Yes"

#### Locate Organization ID

* Sign into [Entra home](https://entra.microsoft.com/#home) as an administrator
* In the left navigation, select Manage > Custom domain names

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-66212e91304bafb2f93c3b6382fd382d8b5e1893%2Fentra-custom-domain-names-menu.png?alt=media" alt=""><figcaption><p>Azure Custom Domain Names</p></figcaption></figure>

* In the domain list you'll find one that ends in `.onmicrosoft.com`. Record this domain for use later in the Dropzone UI where it is called "Organization ID"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-2bfb7ef162bee1af5017f1c5939dd0a824a7b7a2%2Fentra-custom-domain-names-list.png?alt=media" alt=""><figcaption><p>Azure Custom Domain Names List</p></figcaption></figure>

## Locate Cloud Apps Information

* Go to <https://security.microsoft.com/>
* In the left navigation, select Settings
* Select Cloud Apps

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-97c7566605f68e5dfd551af46bc6c6af280d9c22%2Fimage.png?alt=media" alt=""><figcaption><p>Defender Cloud Apps API URL</p></figcaption></figure>

Record the "API URL" for use later in the Dropzone UI where it is called "Portal URL".

## Enable Microsoft 365/Microsoft Defender

The Alert Source integration allows Dropzone AI to pull alerts from Exchange Online and Microsoft Defender for investigation.

You'll need the following information:

| Dropzone Field  | Source                                           |
| --------------- | ------------------------------------------------ |
| Client ID       | The "Application (client) ID" you copied earlier |
| Tenant ID       | The "Directory (tenant) ID" you copied earlier   |
| Client Secret   | The client secret "value" you copied earlier     |
| Organization ID | The "Organization ID" you copied earlier         |

To enable the Alert Source integration, do the following:

* Navigate to your Dropzone AI tenant home page e.g. https\://*mycompany*.dropzone.app
* In the bottom left hand corner, click Settings > Integrations

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-b3f07f902b1402dadc7abbd8bb62f9c204547390%2Fui-integrations-dropdown.png?alt=media" alt=""><figcaption><p>Integrations Dropdown</p></figcaption></figure>

* Click "Available"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-434641ec6d4e45051842f86164f485d6bd289424%2Fapp_system_integrations_available.png?alt=media" alt=""><figcaption><p>Click Available</p></figcaption></figure>

* In the Search bar, search MS 365/Defender, then click "Configure"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-698de40b519f2f9f0c16c311b9c0900523d9b58e%2Fapp_system_integrations_available_ms365.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Source Tile</p></figcaption></figure>

* Under the Alert Source heading, input the Client ID, Tenant ID, and Client Secret
* Input your chosen [log-ingestion delay](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-ingestion-time#indexing-time)

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-0839330516fc97f240943bb0a7a8526e2db078d3%2Fapp_system_integrations_available_ms365_alert_config_1.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 1)</p></figcaption></figure>

* Select whether you want to ingest alerts or incidents from Microsoft Defender. If you chose to ingest alerts, select which Microsoft Defender Detection Sources you wish to allow Dropzone to investigate alerts from

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-949d06a9321090a85057757b520272224ffd0bab%2Fapp_system_integrations_available_ms365_alert_config_2.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 2)</p></figcaption></figure>

* In the "Enabled Severity Levels" section, select the severity levels of alerts you want Dropzone to investigate

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-033ee520d179f89053007ec4b5e9434d3a2f147d%2Fapp_system_integrations_available_ms365_alert_config_3.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 3)</p></figcaption></figure>

* To enable Dropzone to ingest Microsoft Email Alerts, check the box labeled "Email Threat Submissions"
* If you wish to exclude emails from analysis, select the categories of emails you want Dropzone to ignore (e.g. Allowed by Policy, Allowed Due To User Override, etc)

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-7b923591ec329822434d0b101305051b5d1873f8%2Fapp_system_integrations_available_ms365_alert_config_4.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 4)</p></figcaption></figure>

* If you wish for Dropzone to use a specified mailbox for Phishing Analysis, check the box labeled "Enable Mailbox-based Phishing Analysis"
* Input the email address for your phishing account
* Input any desired [filters](https://learn.microsoft.com/en-us/graph/filter-query-parameter)

{% hint style="success" %}
This will allow your organization to limit the scope of Dropzone AI's Mail.Read permissions. See the [Mail-Enabled Security Group](https://docs.dropzone.ai/integrations/alert/ms_alert/ms365_email_group) documentation for instructions on how to create a designated phishing account.
{% endhint %}

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-f958ebab99d14d5cbabee66fca2d607b7cdd926e%2Fapp_system_integrations_available_ms365_alert_config_5.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 5)</p></figcaption></figure>

* If you wish to enable Dropzone to retrieve quarantined emails for phishing analysis, check the box labeled "Enable PowerShell API" in the PowerShell API Configuration section. Enter the Organization ID you saved earlier (which should end in .onmicrosoft.com)

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-1f4d271fca10947df4840ce90e45db135afd46fe%2Fui-ms365-alert-source-powershell-config.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 6)</p></figcaption></figure>

* In the Defender Alert and Incident Exclusions, you may further customize your MS Defender alerts by checking the boxes labeled "Prelude Security," "Custom File Exclusion," and "Title Exclusion"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-34988134fa67528bbd16078aa6a7980b2d1e30e3%2Fapp_system_integrations_available_ms365_alert_config_6.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 7)</p></figcaption></figure>

* If you wish to customize your ingestion of [Data Loss Prevention alerts](https://learn.microsoft.com/en-us/purview/dlp-alert-investigation-learn), in the DLP Enforcement Mode section, select a DLP enforcement mode to filter the layers by. If you do not select an enforcement mode, all DLP alerts will be ingested

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-da5bf906d0e364ee718cda05d054e90e7e37b5aa%2Fapp_system_integrations_available_ms365_alert_config_7.png?alt=media" alt=""><figcaption><p>The Microsoft 365/Defender Alert Configuration (pt 7)</p></figcaption></figure>

* Input your desired poll interval and lookback
* Click "Test & Save" to finish

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-88ea456769f02da8b8a1f68ccb2ba2bf1a9b9bfe%2Fapp_system_integrations_available_ms365_alert_config_8.png?alt=media" alt=""><figcaption><p>Click Test &#x26; Save</p></figcaption></figure>

You should begin ingesting alerts immediately.

If you have any errors engage your Dropzone AI support representative.
