> For the complete documentation index, see [llms.txt](https://docs.expel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expel.io/connect-your-technology/l-p-integrations/microsoft/microsoft-defender-for-identity-setup-for-workbench.md).

# Microsoft Defender for Identity Setup for Workbench

{% hint style="info" %}
This setup guide only covers Microsoft Defender XDR. To find a different setup guide, search for the technology or check the [Integrations](/connect-your-technology/about-integrations/expel-integrations.md) page and select the hyperlink (if available) to go directly to the guide.
{% endhint %}

## Scope and Limitations

In order for us to collect the logs from Microsoft Defender for Identity, you must provision the Azure App so that it can perform graph API queries for the following three endpoints:

* `/security/alerts_v2`
* `/security/incidents`
* `/security/runHuntingQuery`

The steps in this guide will help you provision the access properly via a custom Microsoft Entra ID App.

## Prerequisites

* You must be able to log in to the Microsoft Entra Admin Console as a user assigned the Global Administrator or User Administrator role.

## Step 1: Enable Console and Cross-Tenant Access for Expel

{% hint style="warning" %}
**If your organization has already created a new Expel account for console access and enabled cross-tenant access for another Microsoft integration, you may skip to** [**Step 2: Create a Custom Microsoft Entra ID Application**](#step-2-create-a-custom-microsoft-entra-id-application). The same "\<Your Organization GUID>@soc.expel.io" account provides access across all Microsoft services.
{% endhint %}

### Step 1: Enable Console Access for a New Account

Expel requires console access to allow analysts to perform investigation and triage. Without this additional level of information, details cannot be verified by our analysts and an investigation cannot be initiated. For more information, see [Why Expel Asks for Console Access](/connect-your-technology/about-integrations/why-expel-asks-for-console-access.md).

1. [Log in to the Microsoft Entra Admin Center](https://entra.microsoft.com/) as a user assigned the Global Administrator or User Administrator role.
2. Navigate to **Entra ID > Users > All Users**.
3. Select **User > Invite external user**.
4. On the **Basics** tab, include the following:
   * **Email** - use your [Organization GUID](#user-content-fn-1)[^1] to create the email address in the format "\<Your Organization GUID>@soc.expel.io". For example, `a123bc45-aa12-123b@soc.expel.io` .
   * **Display Name** - enter "Expel SOC".
5. On the Assignments tab, configure the following:
   * Select **Add role**.
   * Search for and select **Global Reader**.

{% hint style="info" %}
This role provides read-only access across most Microsoft 365 and Azure management consoles.
{% endhint %}

6. Select **Review + invite** and then **Invite**.

The user account will be added to your directory as a guest, and an invitation will be sent to the email provided.

### Step 2: Enable Cross-Tenant Access

In this step you will add Expel as an external organization and configure inbound trust.

1. Still in the Microsoft Entra Admin Center, navigate to **Entra ID > External Identities > Cross-tenant access settings**.
2. Select the **Organizational settings** tab.
3. Select **Add organization**.
4. On the Add organization pane, enter Expel’s tenant ID: `1cde81fd-b430-4035-b24d-709921922876`
5. Select **Expel** from the search results, and then select **Add**.
6. In the Organizational settings list, locate the **Expel** row and select **Inbound access**.
7. On the "Inbound access settings - Expel" page, select the **Trust settings** tab, and configure the following:
   * Select **Customize settings**.
   * Enable **Trust multifactor authentication from Microsoft Entra tenants**.
   * Enable **Trust compliant devices**.
   * Enable **Trust Microsoft Entra hybrid joined devices**.
   * Under Automatic redemption, enable **Automatically redeem invitations with the tenant Expel**.
8. Select **Save**.

## Step 2: Create a Custom Microsoft Entra ID Application

{% hint style="warning" %}
If you have already set up the Microsoft Defender XDR integration and wish to reuse your custom Entra ID app rather than creating a new one, you may skip to [Step 3](#step-3-add-microsoft-defender-for-identity-as-a-security-device-in-workbench). Just be sure you know the Entra ID app's Application (client) ID, Directory (tenant) ID, and Client Secret value, as you will need them to set up the security device in Workbench.
{% endhint %}

Creating a custom application allows us to perform the necessary graph API queries and collect the Microsoft Defender for Identity logs.

1. [Log in to Azure.](https://portal.azure.com/)
2. Navigate to the **Microsoft Entra ID** service.
3. Go to **Manage > App registrations**.
4. Select **New registration**.
5. Fill in the application details as follows:
   * **Name** - enter "Expel Defender for Identity", or another name of your choosing.
   * **Supported account types** - leave the "accounts in this organizational directory only" option selected (the first option).
6. Select **Register**.
7. You will navigate automatically to the Settings page for the app you just created.
8. Copy and save the **Application (client) ID** and **Directory (tenant) ID** to a safe place, as you will need it in the next step.
9. In the left menu, go to **Manage > API permissions**.
10. Select **Add a permission**.
11. Add the following permissions as **application permissions** (not as delegated permissions):
    * `SecurityAlert.Read.All`
    * `SecurityEvents.Read.All`
    * `ThreatHunting.Read.All`
    * `SecurityIncident.Read.All`
12. After all permissions are assigned, select **Grant admin consent** and **Yes** at the prompt.
13. Still in the new app, use the left menu to go to **Manage > Certificates & secrets**.
14. Select **New client secret**.
15. For the new secret:
    * **Description** - enter a description, such as "Expel API".
    * **Expires** - select **730 days (24 months)**.&#x20;
16. Select **Add**.
17. Copy and save the **client secret's** [**value**](#user-content-fn-2)[^2] to a safe place, as you will need it in the next step.

## Step 3: Add Microsoft Defender for Identity as a Security Device in Workbench

{% hint style="info" %}
Before you begin, make sure you have the application (client) ID, directory (tenant) ID, and the client secret value from Step 2.
{% endhint %}

1. [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
2. In the side menu, navigate to **Organization Settings > Security Devices**.
3. Select **Add Security Device**.
4. In the search box, enter “Defender” and then select the Microsoft Defender for Identity integration.
5. A configuration pane displays. Complete the fields as follows:
   * **Name** - enter a name that might help you more easily identify this integration, such as “CompanyName Microsoft Defender for Identity”; this name will display in Workbench under the Name column, and is a text string that you can filter on.
   * **Location** - enter the location of your integration, for example “cloud;” this is also a text string that you can filter on, so we recommend being consistent with location naming across your Expel integrations.
   * **Directory ID** - enter the directory (tenant) ID value from Step 2.
   * **Application ID** - enter the application (client) ID value from Step 2.
   * **Client secret** - enter the client secret value from Step 2.
6. Select **Save**.
7. For console access, select **Set up later** from the dropdown (Expel will complete the console access setup process). [Why do we need console access?](/connect-your-technology/about-integrations/why-expel-asks-for-console-access.md)
8. Select **Save**.

Your device should be created successfully within a few seconds. A few reminders:

* After your connection is healthy, it will take some time for your device to begin polling and receiving data.
* To check on the status, select the downward arrow for your device in the first column and choose **View details**.
* Polling will happen first; data will be received after that. **You must refresh the page to see updates.**
* If your device does not begin polling within 15 minutes, and does not begin receiving data within 30 minutes, [contact our support team for help](/support/how-to-reach-us.md).
* To check if alerts are coming through, navigate to **Dashboards > Alert Analysis**. Scroll to the device you want to check, and select the **Expel Alerts** tab to reveal more alert information. It can take 36 to 72 hours for alerts to appear after setup, as we [tune your device](/workbench-reference/alerts/how-expel-alerts-work.md#device-tuning).

## Troubleshooting

If your device is not healthy, [edit the security device](/connect-your-technology/security-devices/manage-security-devices.md#edit-a-security-device) and:

1. Make sure you entered the Application (client) ID and Directory (tenant) ID correctly, and that you put the correct value in the correct field.
2. Make sure you entered the Client Secret *value*, and not the Secret ID, into the security device.
3. If neither of the above works, validate the permissions of the Entra ID app and that the app was given access to the appropriate resources.

If you are still unable to connect your device after trying the above steps, [contact Support](/support/how-to-reach-us.md).

[^1]: * [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
    * Go to **Organization Settings > My Organization**.
    * On the organization's page, look for the Organization GUID and select the **Copy** button to copy the GUID.

[^2]: Make sure you copy the value, not the secret ID.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.expel.io/connect-your-technology/l-p-integrations/microsoft/microsoft-defender-for-identity-setup-for-workbench.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
