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

> ## Agent Instructions
> These docs cover three products: TrustGate (AI agent gateway), TrustGuard (runtime security), and TrustTest (AI red teaming). Start from each product overview for the definition and How it works. Prefer the .md URL next to a page in /llms.txt when you need the full article. Use /llms-full.txt for a single-file dump of the site.

# Connect Microsoft 365

> Connect Microsoft 365 with an Entra ID app registration and the Mail.ReadWrite application permission. It delivers simulations and training, and turns on email security.

One app registration in your tenant, with one permission. TrustForce uses it
to place simulations and training invitations in Outlook mailboxes, and to
watch those mailboxes for real threats.

The connection:

* **Delivers simulations and training invitations** into each mailbox through
  Microsoft Graph. No MX change, no connector, and nothing to allow-list in
  Exchange Online Protection.
* **Turns on [email security](https://docs.neuraltrust.ai/employee-security/email-security.md)** for every
  employee's mailbox.
* **Reads the reporting mailbox** for Outlook's built-in **Report** button, if
  you [set one up](https://docs.neuraltrust.ai/employee-security/report-suspicious-email.md#microsoft-365).

It does not read your directory. Employees come from
[your directory source](https://docs.neuraltrust.ai/employee-security/connect/directory.md).

**Before you start** you need someone who can create app registrations and
grant admin consent in Microsoft Entra ID, and **Employee Security Admin** in
NeuralTrust.

**1. Register an app in Microsoft Entra ID**

In the [Microsoft Entra admin center](https://entra.microsoft.com), open
**Applications → App registrations** and click **New registration**. Name it,
for example `NeuralTrust TrustForce`, and choose **Accounts in this
organizational directory only (single tenant)**. No redirect URI is needed.

**2. Add the permission**

Open **API permissions → Add a permission → Microsoft Graph → Application
permissions**, select **Mail.ReadWrite**, and add it. Then click **Grant admin
consent**.

It must be an **application** permission, not a delegated one: TrustForce
works in the background, with nobody signed in.

**3. Create a client secret**

Open **Certificates & secrets → Client secrets → New client secret** and copy
its **Value**; Entra shows it only once. Note the expiry date: the connection
stops working when the secret expires.

**4. Connect it in NeuralTrust**

Open **Settings → Employee Security → Integrations → Microsoft 365** and enter:

| Field | Where to find it |
| - | - |
| **Directory (tenant) ID** | The app's **Overview** page |
| **Application (client) ID** | The app's **Overview** page |
| **Client secret value** | The value you copied |

Click **Save and test**. The test checks that **Mail.ReadWrite** was granted.

The status turns **Connected**, and email security starts watching
mailboxes.

> [!NOTE]
>
> As an application permission, **Mail.ReadWrite** covers every mailbox in the
> tenant. TrustForce only uses the mailboxes of your active employees and the
> reporting mailbox, if you set one.

## Troubleshooting

| What you see | What to check |
| - | - |
| The test says the permission is missing | **Mail.ReadWrite** is an application permission, and admin consent was granted |
| **Error** after it worked before | The client secret may have expired. Create a new one and save it |
| A recipient shows **Not delivered** | The address has no Exchange Online mailbox in your tenant |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.