--- title: "Microsoft Defender for Office365" slug: "microsoft-defender-for-office365" updated: 2025-03-18T22:55:40Z published: 2025-03-18T22:55:40Z canonical: "docs.databee.buzz/microsoft-defender-for-office365" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.databee.buzz/llms.txt > Use this file to discover all available pages before exploring further. # Microsoft Defender for Office365 Microsoft Defender for Office 365 allows you to secure your email and Microsoft Teams with advanced protection against phishing, business email compromise, ransomware, and other cyberthreats. For more information, please refer to [Microsoft’s official documentation](https://www.microsoft.com/en-in/security/business/siem-and-xdr/microsoft-defender-office-365). **Integration Method:** API **Tables**: Detection Finding (2004), Ticket Inventory (99405001), Training Inventory (99405002) This integration supports the following events. | **Event** | **Description** | | --- | --- | | Simulation User Coverage | List [training coverage](https://learn.microsoft.com/en-us/graph/api/resources/attacksimulationtrainingusercoverage?view=graph-rest-1.0) for each tenant user in attack simulation and training campaigns. | | Simulation Repeat Offenders | List the tenant users who have yielded to attacks more than once in attack simulation and training campaigns. | | Simulation Training User Coverage | List training coverage for tenant users in attack simulation and training campaigns. | | Attack Simulations | List users of a tenant and their online actions in an attack simulation campaign. | This integration supports the following versions. | Microsoft Graph API version | v1.0 | | --- | --- | > [!NOTE] > **Note:** > > Microsoft Defender for Office365 is a SaaS service. This document was prepared with the latest release in [**February 2025**](https://learn.microsoft.com/en-us/defender-office-365/defender-for-office-365-whats-new#february-2025). ## Prerequisites - The user should have access to the [Azure portal](https://portal.azure.com/) with an account that has the Global Administrator privileges. - The user should have access to the DataBee console. ## Configuration Overview 1. Create an application with required permissions to fetch the data. 1. [Create an application](/user-manual/docs/microsoft-defender-for-office-365#create-an-application). 2. [Add endpoint access](/user-manual/docs/microsoft-defender-for-office-365#add-endpoint-access). 3. [Create the client secret](/user-manual/docs/microsoft-defender-for-office-365#create-the-client-secret). 2. Create [Microsoft Defender for Office365 Data Feed](/user-manual/docs/microsoft-defender-for-office-365#databee-configuration) in the DataBee console with the required Client credentials. | **DataBee Parameter** | **Azure Parameter** | | --- | --- | | Client Key | Application (client) ID | | Client Secret | Client Secret Value | | Token URL() | Directory (Tenant) ID | ## Azure Configuration ### Create an application 1. Log on to [Azure portal](https://portal.azure.com/) with an account that has the Global Administrator privileges. 2. In the search bar, search for **App Registrations** and select it. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-wsokmcdw.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 3. On the “App registrations” page, select **New registration,** the **“**Register an application” window will appear. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-buzaf567.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 4. On the “Register an application” window: 1. Under ‘Name’ enter your Application Name then click on **Register** to create the application. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-e3ai9zdv.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 5. On the app **Overview** page, copy the **Application (client) ID** and **Directory (tenant) ID** for later use. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-hosb1nv7.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) ### Add Endpoint Access Once the application is created, one permission to the Graph API is needed to fetch the data. This section details how to configure and add permission to the required endpoints. #### Add Permissions From the **Azure portal**: 1. Select the application registered in the previous step. 2. Under **Manage,** click **API Permissions** and then click **Add a Permission,** the **Request API permissions** window will appear. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-owv7gud0.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 3. On “Request API permissions” window, Click on **Microsoft APIs** then on **Microsoft Graph.** ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-jyi52og9.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 4. Click on **Application Permissions.** ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-1h4deus2.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 5. The following permissions need to be granted for the endpoint to function properly: | **Event** | **Type** | **Permission** | | --- | --- | --- | | Simulation User Coverage | Application | AttackSimulation.Read.All | | Simulation Repeat Offenders | Application | AttackSimulation.Read.All | | Simulation Training User Coverage | Application | AttackSimulation.Read.All | | Attack Simulations | Application | AttackSimulation.Read.All | 1. In the **Select permissions** search bar, enter the permission shown above, and check the box to include them. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-irfx04ef.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 2. Click the **Add permissions** button after selecting all required permissions. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-s2ydvs7w.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 3. On the “API permissions” page, click **Grant Admin Consent** **for ** and click on Yes button for consent confirmation. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-4dol6hdf.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 4. The required permissions have now been added for the endpoints. After this step, the permissions should include these minimum required permissions shown. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-83j1awtq.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) ### Create the Client Secret The final step to accessing the APIs is creating a Client Secret. To create it from the Azure Portal: 1. Select the application created above. 2. Under **Manage**, Click **Certificates and Secrets**, and then **Client Secrets.** ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-1bwp5xml.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 3. Click **New client secret**. Then “Add a client secret” window appears. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-n6ti8bpj.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 4. In the “Add a client secret” window: 1. Enter a ‘Description’ for this client secret and select the desired expiry period from the ‘Expires’ drop-list. 2. Then click on **Add** to create the client secret. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-ysd1fnd2.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) > [!NOTE] > Note: > > The user needs to re-create the client secret when it expires. 5. Copy the Secrets **Value** field for later use. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-gbdmiaym.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) ## DataBee Configuration 1. Login to the DataBee UI, navigate to **Data** > **Data Feeds** and click the **Add New Data Feed** button. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-dzu9al3a.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 2. Search for the **Microsoft Defender for Office365** and click it as shown below. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-2yztsq2l.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 3. Click on the **API Ingest** option for collection method. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-wxv6frjz.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 4. Enter feed contact information and click **Next**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-m7c97xbl.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 5. In the configuration page, enter the following: - API Base URL: this is the base URL that DataBee will interact with. - Authorization Method: OAuth2 - Client Key: paste the **Application (Client) ID** generated earlier . - Client Secret: paste the **Secret value** generated earlier. - Token URL: replace with your **Directory (Tenant) ID.** - Event Types: preselected for all the Event Types the integration pulls. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/microsoft-defender-for-office365-mar2025-image-cc28eph6.png?sv=2026-02-06&spr=https&st=2026-10-30T12%3A22%3A31Z&se=2026-10-30T13%3A22%3A31Z&sr=c&sp=r&sig=THVUutkS34o7fxaTz4Dz0%2FcIOLuplNP7QNvI30TC4CM%3D) 6. Click **Submit**. ## Troubleshooting Tips - If you are facing an **invalid client** or **unauthorized client** error this might be possibly due to incorrect credentials. Ensure the client key, client secret and Tenant ID are pasted correctly. Since you cannot view the client secret after the 1st time, re-create it, paste it on a text editor to ensure no spaces or unexpected characters are included and reconfigure the DataBee feed. - If you are facing a response code – 403 error**,** this might be possibly due to missing permission. Ensure that all the required permissions are granted correctly as per the above-mentioned steps.