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

# Microsoft 365

> Connect Fini to Microsoft 365, add shared mailboxes, choose monitored folders, and route email conversations to the right AI agents.

Connect Fini to Microsoft 365 so your AI agents can respond from shared support mailboxes. The deployment is tenant-first: a Microsoft tenant administrator grants consent once, then you add the shared mailboxes Fini should read from, choose which folders to monitor, and route each mailbox to a Fini agent.

<Note>
  Microsoft 365 setup uses admin consent for the customer tenant. Use a shared mailbox owned by your support team, not an individual teammate's personal mailbox.
</Note>

## Before you connect

You'll need:

* A **Microsoft 365 tenant administrator** who can grant organization consent.
* The **shared mailbox addresses** Fini should read from and send as, for example `support@acme.com` and `billing@acme.com`.
* At least one **agent** already created in Fini. If you haven't created one yet, do that first from [Agent home](/en/configuration/agent-home).

## What Fini does with Microsoft 365

Fini uses Microsoft Graph and Exchange access for the mailbox you configure. After consent and validation, Fini can:

* **Read messages from configured shared mailboxes and monitored folders** so agents can understand incoming customer context.
* **Acquire an Exchange token** for the tenant so Fini can operate on the mailbox.
* **Route each mailbox to a Fini agent** based on the deployment mapping you save in Fini.

Fini stores the Microsoft tenant ID returned during consent, the configured shared mailbox addresses, monitored folder IDs, connection status, validation timestamps, and the agent routing map. When you add a mailbox, Fini checks that Microsoft Graph can access that mailbox before saving it.

## Connect Microsoft 365

Open **Deploy -> Microsoft 365** in the dashboard.

<Steps>
  <Step title="Start Microsoft consent">
    Click **Connect Microsoft 365**. Microsoft opens an administrator-consent flow for your organization.
  </Step>

  <Step title="Approve consent in Microsoft">
    Sign in as a tenant administrator and approve the requested application permissions.
  </Step>

  <Step title="Return to Fini">
    After Microsoft redirects back, the deploy page shows the customer tenant ID and the connection status changes to **Connected**.
  </Step>

  <Step title="Add a shared mailbox">
    In **Shared mailboxes and bot routing**, enter the mailbox address and click **Add mailbox**. Fini validates access before saving the mailbox.
  </Step>
</Steps>

## Add mailboxes and configure bot routing

After tenant consent succeeds, configure **Shared mailboxes and bot routing**:

1. Add each shared mailbox that Fini should monitor.
2. Select the Fini agent that should answer messages from each mailbox.
3. Use the folder selector to choose which folders Fini should monitor for that mailbox.
4. Click **Save routing**.

Each mailbox uses the same tenant authorization. The routing map stores mailbox addresses under the selected agent, so one Microsoft 365 tenant can route different shared mailboxes to different Fini agents.

<Note>
  You can add up to 50 shared mailboxes to one Microsoft 365 connection. Removing a mailbox also removes that mailbox from bot routing and monitored-folder configuration.
</Note>

### Choose monitored folders

Each shared mailbox starts with **Inbox** selected. Click the folder count next to a mailbox to open **Monitored folders**, then select the mailbox folders Fini should watch.

Fini responds only to new messages delivered to selected folders. This is useful when a shared mailbox separates inbound work into folders such as Support, Billing, or Regional queues.

Folder selection rules:

* Select at least one folder.
* Select up to 20 folders per mailbox.
* Fini hides folders that are not valid inbound sources, such as Sent Items, Drafts, Outbox, Deleted Items, and Junk Email.
* When you add a new monitored folder, Fini starts monitoring new messages from that point forward.

## Verify it's working

1. Send a test email to one configured shared mailbox.
2. Open Fini Inbox and confirm the conversation appears under the agent mapped to that mailbox.
3. Check the source mailbox if the agent should send a reply.

If the conversation does not appear, re-open **Deploy -> Microsoft 365** and check the connection status, mailbox list, monitored folders, and bot routing first. A tenant can be connected before any shared mailbox has been added, routed, or pointed at the folder where the message arrived.

## Troubleshooting

**Consent failed or expired.** Start the connection again from the deploy page. The consent state expires after a short window, so a stale Microsoft tab can fail even if the account has the right permissions.

**Mailbox validation failed.** Confirm the shared mailbox exists in the customer tenant and that the approved Microsoft application can access it through Graph. Add the mailbox again after the Microsoft administrator fixes access.

**The wrong agent is answering.** Check **Shared mailboxes and bot routing** and save the intended agent for that mailbox again.

**Messages in another folder are not appearing.** Open **Monitored folders** for the mailbox, select the folder, and save. Fini only watches the folders selected for that mailbox.


## Related topics

- [Channel overview](/en/deploy/overview.md)
- [Inbox](/en/testing/inbox.md)
- [Intent Rules](/en/automations/rulebook.md)


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