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

# Defender for Endpoint Integration

Show Microsoft Defender for Endpoint onboarding, exposure level, risk score, alerts, vulnerabilities and recommendations on RealmJoin device pages.

With the optional **Security features** enabled, RealmJoin Portal queries the Microsoft Defender for Endpoint (MDE) API for a device's Defender record and its alerts, vulnerabilities, security recommendations, logged-on users and installed software. It shows them on the [device details](https://docs.realmjoin.com/ugd-management/user-list/device-details.md) page next to the device's Intune, Entra ID, Autopilot and RealmJoin Client data.

{% hint style="info" %}
The integration is read-only and does not replace the Microsoft Defender portal. RealmJoin changes nothing in Defender: you investigate and resolve alerts and remediate recommendations in Microsoft Defender, which the device page links to.
{% endhint %}

## Prerequisites

* **Microsoft Defender for Endpoint licenses** for the devices you want to see.
* **Devices onboarded** to Defender for Endpoint. Devices that are not onboarded show no Defender data.
* The **Security features** activated for your organization (see below). They are **not** part of the default RealmJoin configuration.

{% hint style="info" %}
Exposure level, vulnerabilities and security recommendations come from Microsoft Defender Vulnerability Management. If your Defender license does not include it, these values stay empty.
{% endhint %}

## Activate the Security features

The Security features use their own app registration, **RealmJoin Portal - Security Features**, which needs read access to the Defender for Endpoint API (`WindowsDefenderATP`). See [Portal Required Permissions](https://docs.realmjoin.com/deployment/required-permissions.md#realmjoin-portal-security-features) for the full list.

Granting it requires an administrator who can give tenant-wide admin consent. Use one of these ways:

* **In the Portal:** Go to **Organization ▸ Features**. In the **Security features** card, select **Activate** and complete the admin consent in Microsoft Entra ID.
* **With PowerShell:** Add the `SecurityFeatures` feature with the RealmJoin PowerShell module, see [Advanced Setup](https://docs.realmjoin.com/deployment/onboarding-realmjoin-portal/advanced-setup.md#available-features):

  ```powershell
  Update-RJTenant -AddFeatures @('SecurityFeatures') 6>&1
  ```

Once active, the **Security features** card lists the granted MDE permissions and offers **Reactivate** to grant them again. The [organization details](https://docs.realmjoin.com/ugd-management/organization-details.md) page shows **Security Features** as *Active*.

## How devices are matched

RealmJoin looks up the Defender device record by the device's **Entra ID device ID**. If Defender has no record with that ID, it falls back to a record whose computer name matches the device's display name, preferring the most recently seen one.

Defender data is cached for up to five minutes, so a change in Microsoft Defender can take a few minutes to show in RealmJoin.

## What the device page shows

The following elements appear on a device's **Overview** tab. Sections without data are hidden, and each one is only shown to roles that have the matching [permission](#permissions).

### Status icon

With the Security features active, the device header shows the **Defender MDE enabled** shield. It is blue when the device is onboarded to Defender for Endpoint and red otherwise.

{% hint style="info" %}
The **A/V up to date** shield next to it is not part of this integration. It is reported by the [RealmJoin Client](https://docs.realmjoin.com/realmjoin-agent/realmjoin-client.md) for all antivirus products on a Windows device.
{% endhint %}

### Endpoint Security Information

A summary of the device's Defender record:

<figure><img src="https://2868468309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2Fgit-blob-97090703430c7c3d06bf9d3d0cf5eac7b5f1dba8%2Fdefender-endpoint-security-information.png?alt=media" alt="Endpoint Security Information section on the device details page"><figcaption><p>Endpoint Security Information</p></figcaption></figure>

| Field              | Meaning                                                                                                                                  |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Onboarding**     | Defender onboarding state, for example *Onboarded*, *CanBeOnboarded* or *Unsupported*. Anything other than *Onboarded* is highlighted.   |
| **Health Status**  | Sensor health, for example *Active*, *Inactive*, *ImpairedCommunication* or *NoSensorData*. Anything other than *Active* is highlighted. |
| **Exposure Level** | How exposed the device is to threats, based on its vulnerabilities and misconfigurations: *None*, *Low*, *Medium* or *High*.             |
| **Risk Score**     | The device's risk based on active alerts: *None*, *Informational*, *Low*, *Medium* or *High*.                                            |
| **Agent Version**  | Version of the Defender for Endpoint sensor.                                                                                             |
| **RBAC Group**     | The Defender device group the device belongs to, or *Unassigned*.                                                                        |
| **First Seen**     | When Defender first saw the device.                                                                                                      |
| **Last Seen**      | When Defender last received data from the device.                                                                                        |

*Low* and lower values are shown in blue, *Medium* in yellow and *High* in red. See Microsoft's [exposure score and risk score](https://learn.microsoft.com/en-us/defender-endpoint/machine-scores) documentation for how Defender calculates them.

If Defender for Endpoint does not answer in time, the section shows a notice instead. Reload the page later to try again.

### Security Alerts

The Defender alerts for the device, most severe and newest first. Each alert shows its title, severity, classification (for example *True positive* or *False positive*), whether it is assigned or resolved, when it was created and last updated or resolved, its description and category, and the evidence Defender collected: files, processes (with process and parent process IDs), URLs, accounts and registry values.

### Security Vulnerabilities

The vulnerabilities (CVEs) Defender found on the device, sorted by severity and then by whether a public or verified exploit exists. Each entry shows its severity, the *Public* and *Verified* exploit flags, when the CVE was published and updated, its description, links to known exploits and a link to the official CVE article.

### Security Recommendations

Defender's security recommendations for the device with their status. Recommendations to update software that updates itself (Microsoft Edge, Google Chrome, Microsoft Office and Visual Studio Code) are marked *Automatic*.

{% hint style="info" %}
Alerts, vulnerabilities and recommendations load in the background after the page opens, because Defender can take several seconds to answer. A **Security** placeholder is shown while they load.
{% endhint %}

### Link to Microsoft Defender

Under **External Links**, **Security Center** opens the device in the Microsoft Defender portal (`security.microsoft.com`).

### MDE Data tab

The **MDE Data** tab shows the raw Defender device record as JSON, together with the alerts, recommendations, logged-on users, vulnerabilities and software Defender reports for the device. Like the other [data source](https://docs.realmjoin.com/ugd-management/user-group-device-management.md#data-sources) tabs, it is only shown when *Show advanced info* is enabled in [Settings](https://docs.realmjoin.com/administration-and-settings/general.md#show-advanced-info).

## Defender Scan

The **Defender Scan** button on the device page is **not** part of this integration. It asks **Intune** to run a Microsoft Defender Antivirus quick scan on the device, so it works without the Security features but requires the device to be managed by Intune. It needs the `CanScanDevice` permission.

## Permissions

Which roles see what is controlled by these [permissions](https://docs.realmjoin.com/administration-and-settings/permission/custom-roles/available-permissions.md#device-security):

| Permission                                | Shows                                                     | Pre-defined roles                             |
| ----------------------------------------- | --------------------------------------------------------- | --------------------------------------------- |
| `CanSeeDeviceExtendedSecurityInformation` | Endpoint Security Information                             | Admin, Advanced Supporter, Supporter, Auditor |
| `CanSeeDeviceSecurityAlerts`              | Security Alerts                                           | Admin, Advanced Supporter, Supporter, Auditor |
| `CanSeeDeviceSecurityVulnerabilities`     | Security Vulnerabilities                                  | Admin, Advanced Supporter, Supporter, Auditor |
| `CanSeeDeviceSecurityRecommendations`     | Security Recommendations                                  | Admin, Advanced Supporter, Supporter, Auditor |
| `CanSeeDeviceExternalLinks`               | **Security Center** link (and the Intune and Entra links) | Admin, Advanced Supporter, Auditor            |
| `CanSeeDeviceJsonAtp`                     | MDE Data tab (with *Show advanced info*)                  | Admin, Advanced Supporter, Auditor            |
| `CanScanDevice`                           | Defender Scan button (Intune)                             | Admin, Advanced Supporter, Supporter          |

Entra Global Administrators have all of them. See [Pre-defined Roles](https://docs.realmjoin.com/administration-and-settings/permission/pre-defined-roles.md) and [Custom Roles](https://docs.realmjoin.com/administration-and-settings/permission/custom-roles.md) for assigning them.


---

# 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.realmjoin.com/ugd-management/defender-integration.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.
