> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xorlab.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Pages under /latest/ document the current release. Paths that begin with a version number, for example /10.0/, are frozen snapshots of superseded releases kept for reference only — never present their instructions as current. If the reader's version is unknown, answer from /latest/ and say which version the answer describes.
> xorlab is deployed on-premises, hybrid, or as a cloud service, and integrates with either Microsoft 365 or on-premises mail infrastructure. Configuration steps often differ between these. State which deployment and integration mode an instruction applies to instead of presenting one as universal.
> Distinguish inline mode from monitoring mode when describing anything that acts on email. Monitoring mode observes a copy and cannot block or quarantine; inline mode routes mail through xorlab and can.
> Write the product name as lowercase 'xorlab'. Use the documented component names: xorlab Control Center (XCC), xorlab MTA, xorlab Sandbox (DANA), xorlab Natural Language Understanding (NLU). After the first mention, use the short forms XCC, MTA, Sandbox, and NLU. Do not use DANA as a standalone name for the Sandbox, but keep it where it is a literal string in configuration keys, container names, and hostnames.
> Do not invent configuration keys, rule parameters, list names, log properties, or API fields. If a value is not present in this documentation, say that it is not documented rather than guessing.

# Activate Case Isolation

> Remove delivered emails from Microsoft 365 mailboxes through the Graph API using the Isolate action.

As soon as you activate this feature, the **Isolate** button appears in the detail view of every email.

<Warning>
  **Prerequisites**

  * Complete [Create Entra ID App](/latest/m365-entra-id-app)
  * Have access to [Entra ID Portal](https://entra.microsoft.com) with an Administrator role
  * Know your customer ID `xyz`, e.g. `xyz.activeguard.cloud`
</Warning>

## Configure Entra ID

1. Go to [Entra ID Portal](https://entra.microsoft.com/) → **Overview** → copy the **Tenant ID** and keep it for future use.

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/aad-tenant-id.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=a58d2f3c2a00f55729867369c69d4dc2" alt="Your AAD Tenant ID" width="2230" height="1456" data-path="latest/assets/aad-tenant-id.png" />

2. In the menu left, go to **App registrations** → select **All applications** → copy the **Application (client) ID** and keep it for future use.

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/app-id.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=7d26429018608eeb8f30b4a7b1c5e0a9" alt="Application (client) ID" width="1238" height="608" data-path="latest/assets/app-id.png" />

3. Open the `xorlab` app → **Certificates & secrets** → **Add a certificate or secret** in the list in the main view:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/app-secret.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=de9f60e38ecad60189ed28687f24e28d" alt="Application certificates and secrets" width="1780" height="528" data-path="latest/assets/app-secret.png" />

4. Click **New client secret**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/new-secret.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=7d8e478aebfbcfe040c8df3f627c2ac6" alt="New client secret" width="1276" height="732" data-path="latest/assets/new-secret.png" />

5. Enter a description for the client secret and set the expiration time in the **Add a client secret** pane that shows up on the right. Click **Add**.

   <Note>
     **Expiration reminder**

     Please make sure to set a reminder for the secret expiration date, since there is no warning message or other information from M365 on the expiring secret.
   </Note>

6. Copy the **Value** of the secret and keep it for future use. This value is displayed only once. If you forget to copy the value or lose it, just delete this secret and create a new one.

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/secret-value.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=f5aa6ee1c7c1a6edb195a25102930454" alt="Secret value" width="1357" height="768" data-path="latest/assets/secret-value.png" />

7. Select **API permissions** from the left pane and click **Add a permission**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/add-permission.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=8fecb5c24bbbb637ed5464da6a840bb6" alt="Adding an API permission for your app" width="1357" height="619" data-path="latest/assets/add-permission.png" />

   <Note>
     **Default permission**

     There can be a default `User.Read` permission already added to your app. It can be left there.
   </Note>

8. Choose **Microsoft Graph**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/microsoft-graph.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=4637e3f12570765efc9d344f2d7a9e11" alt="Selecting Microsoft Graph API" width="1704" height="1200" data-path="latest/assets/microsoft-graph.png" />

9. Click **Application permissions**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/application-permission.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=d59a0b63ebc239f53fc5795fd7cfab83" alt="Application permissions" width="1680" height="534" data-path="latest/assets/application-permission.png" />

10. Available permissions grouped in categories are displayed. Use the search field to filter the permissions:

    * Filter for `mail` and check the box next to `Mail.ReadWrite`

      <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/mail-permissions.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=68012263429a424898c1e7c00eddf35e" alt="Selecting mail permissions" width="1054" height="842" data-path="latest/assets/mail-permissions.png" />

    * Filter for `user.read` and check the box next to `User.Read.All`

      <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/user-permissions.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=ece2b1ab49936c6a5fbe0997994a7216" alt="Selecting user permissions" width="1058" height="502" data-path="latest/assets/user-permissions.png" />

11. Click **Add permissions**. On the main **API Permissions** page, you should see the three new permissions granted. Click the **Grant admin consent for…** button above the list to apply the permissions change.

    <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/app-permissions-entra.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=b4d7ec386a2a1227f9ecdcfb36ced764" alt="New permissions for your app" width="687" height="218" data-path="latest/assets/app-permissions-entra.png" />

## Configure xorlab

1. In xorlab, open the **Admin** view in the upper right. If you have more than one tenant, select the one you want to activate case isolation for in the dropdown.

2. Open **Integrations**, and add the *Tenant ID*, *Application (client) ID* and *Client Secret* value from before to the **Credentials** section and save it.

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/m365-credentials.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=ae99f7e861861ee3cc02ff6012775159" alt="M365 credentials" width="2915" height="1151" data-path="latest/assets/m365-credentials.png" />

3. Go back to the Expert Editor and open the file `shared/guarded_tenants.yml`.

4. Enable case isolation for the corresponding tenant by adding these two lines:

   ```yaml shared/guarded_tenants.yml {5-6} theme={null}
   tenants:
     - name: <tenant-name>
       domains:
         - <tenant-domain>
       caseIsolation:
         enabled: true
   ```

5. Click **Publish**. Within about one minute, case isolation will be active for that tenant.

## Next steps

* [Move M365 Quarantine to xorlab](/latest/m365-move-quarantine)
