# Microsoft (MS 365 etc)

## Microsoft Integrations

Dropzone AI integrates with [Microsoft 365/Microsoft Defender](https://docs.dropzone.ai/integrations/alert/ms_alert/ms365_alert), as well as [Microsoft Sentinel](https://docs.dropzone.ai/integrations/alert/ms_alert/mssentinel_alert). This document serves as an overview for performing certain steps of their integration. Further information on how to perform the integrations for Microsoft 365/Defender and Microsoft Sentinel can be found on their separate pages.

### 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
* Assign the necessary API permissions to the application

## Register a New Application in Microsoft Entra Admin Center

{% hint style="info" %}
Microsoft's documentation for registering an application is available at <https://learn.microsoft.com/en-us/graph/auth-register-app-v2>
{% endhint %}

* Sign into [your Entra home](https://entra.microsoft.com/#home) as an administrator
* In the left sidebar, navigate to Identity > Applications > App Registrations

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-b54e236c60bcee5cb6c221ac4aa484e0ce4f4c9e%2Fms365-api-2.png?alt=media" alt=""><figcaption><p>Navigate to App Registrations</p></figcaption></figure>

* Click "New Registration"
* Name the new application something memorable, such as "Dropzone AI"
* Under "Supported account types," select "Accounts in this organizational directory only (Single tenant)"
* Leave the "Redirect URI (optional)" section blank
* Click "Register"

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

### Client ID, Tenant ID, and Client Secret

Once the application has been created, it will redirect you to the application's Overview page.

{% hint style="info" %}
Microsoft's documentation for creating client credentials for an application is available [here](https://learn.microsoft.com/en-us/graph/auth-register-app-v2#add-credentials)
{% endhint %}

* In the Overview page, copy the Application ID and the Directory ID for use later in the Dropzone UI, where they are called "Client ID" and "Tenant ID" respectively

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-b45cce1cbe56d7b53746e05805defa37a06d703b%2Fmsgraph-application-overview.png?alt=media" alt=""><figcaption><p>Copy the integration details</p></figcaption></figure>

* Next to "Client credentials," click "Add a certificate or secret"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-275158430eb68d340ac1a678d8b9e782c0d2456b%2Fmssentinel-api-4-1.png?alt=media" alt=""><figcaption><p>Add a certificate or secret</p></figcaption></figure>

* Under the Client secrets heading, click "New client secret"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-40785a740f6167a4f5717978d6d2961ac201756d%2Fmssentinel-api-5-1.png?alt=media" alt=""><figcaption><p>Create a new client secret</p></figcaption></figure>

* Enter a description for the client secret, such as "Dropzone AI Integration Secret," and choose an appropriate expiration date. Click "Add"

{% hint style="warning" %}
Your Dropzone integration will stop working when the client secret expires. Consider setting a calendar reminder to update the key prior to expiration. For convenience's sake, we recommend picking a longer expiration date, to limit the number of times the client secret must be updated.
{% endhint %}

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-0a007653b21fbdefdafa1d51638cf22205539e62%2Fmssentinel-api-6-2.png?alt=media" alt=""><figcaption><p>Add client secret</p></figcaption></figure>

* Under "Value," copy the Client Secret Value for use later in the Dropzone UI, where it is called "Client Secret"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-057a111362fc29d7374be9aea7e7eb22e919e235%2Fmsgraph-client-secret-value.png?alt=media" alt=""><figcaption><p>Copy the Client Secret Value</p></figcaption></figure>

{% hint style="danger" %}
This value is not shown after you leave this page - be sure to record it immediately.
{% endhint %}

## Set Application Permissions

* In the application's sidebar, navigate to Manage > API permissions

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-f0a15cf4c14f6b5ffde23438d7fcc8f8ff699e5e%2Fmssentinel-api-6-1.png?alt=media" alt=""><figcaption><p>Navigate to API permissions</p></figcaption></figure>

* Click "Add a permission"

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

{% hint style="info" %}
Depending on the integration you are performing, you will need to add different permissions. See ([Microsoft 365/Microsoft Defender](https://docs.dropzone.ai/integrations/alert/ms_alert/ms365_alert) or [Microsoft Sentinel](https://docs.dropzone.ai/integrations/alert/ms_alert/mssentinel_alert) for more details). For the purpose of this overview, the Microsoft Graph API has been used.
{% endhint %}

* In the search bar, input the desired API, such as "Microsoft Graph" and select it

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

* Click "Application permissions"
* In the search bar, input the name of the permission your integration requires, then check the box next to it. Continue to do so until all permissions have been added, then click "Add permissions"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-3b85f9235e196491868b38e1a979ac8811ecc60f%2Fmssentinel-api-11-1.png?alt=media" alt=""><figcaption><p>For example, add the SecurityEvents.Read.All permission</p></figcaption></figure>

Once back in the Application API permissions page, you should now see the permissions, such as the following:

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-657fbd0cfc830c384ce430a3b34a5038d972fe4f%2Fmsgraph-all-permissions.png?alt=media" alt=""><figcaption><p>(Example permissions)</p></figcaption></figure>

* 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>

You should now see all the required permissions listed with a green check mark

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-c9add74f163076aab6be889ca2a4ae9289996b27%2Fmsgraph-all-permissions-summary.png?alt=media" alt=""><figcaption><p>(Completed permissions)</p></figcaption></figure>
