> For the complete documentation index, see [llms.txt](https://docs.threatdefence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.threatdefence.com/microsoft-365/microsoft-defender-for-endpoint.md).

# Microsoft Defender for Endpoint

This guide walks you through enabling Microsoft Defender API access in ThreatDefence SIEM.

> **Requirements:**
>
> * Access to Microsoft 365 services (Microsoft 365 Compliance Center, Azure Active Directory)
> * **Premium P1/P2 Licensing** (ThreatDefence will automatically extract available security events based on your license tier)

***

## Step 1: Grant API Permissions in Azure

### 1. Register an Application

* Create an Application ID and secret as described in the [Microsoft 365 Guide](/microsoft-365/microsoft-365.md).

![Create Application](https://4191868192-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOlFHF8fl339QOw3Og8L7%2Fuploads%2Fgit-blob-06871825da4c1795b9b04c0972733e8b13bc1c1a%2Fgrantapi.png?alt=media)

### 2. Assign Windows Defender ATP Permissions

* In your application page for ThreatDefence, go to **API Permissions** > **Add permission** > **APIs my organization uses**.
* Search for **WindowsDefenderATP** and select it.

![Windows Defender ATP Permissions](https://4191868192-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOlFHF8fl339QOw3Og8L7%2Fuploads%2Fgit-blob-18faf4c5252165a585c6af8fa8c3c592d7c13d73%2FMSDefenderATPPerms.png?alt=media)

* Select **Application Permissions** and add the following:

#### Standard Permissions

```
Alert.ReadWrite.All
Software.Read.All
Vulnerability.Read.All
SecurityRecommendation.Read.All
BrowserExtensionsInventoryByMachine
Machine.Read.All
runAntiVirusScan
```

#### Host Isolation Permissions (Optional, for host isolation via MS Defender endpoint agents)

To enable Host Isolation features, also add:

```
Machine.Isolate
```

* Click **Add Permissions**.

### 3. Grant Admin Consent

* Click **Grant admin consent for \[Your Organization]** to grant the permissions you just added.

![Grant Admin Consent](https://4191868192-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOlFHF8fl339QOw3Og8L7%2Fuploads%2Fgit-blob-29e4851b2a681bc9bd2d84ad9c83e05f7160aba8%2FMSDefenderGrantAdmin.png?alt=media)

***

## Step 2: Configure ThreatDefence SIEM

1. Log in to your [ThreatDefence SIEM Portal](https://portal.threatdefence.io).
2. Navigate to **Deployments** > **Integrations**.
3. Click **Add** and select **Microsoft Defender API**.

***

## Need Help?

If you have any questions or need further assistance, please contact: **support \[at] threatdefence.com**

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.threatdefence.com/microsoft-365/microsoft-defender-for-endpoint.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
