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

# Overview

> A reference for every Outlook action available in DeepMask — what each one does, when to use it, and what parameters it accepts.

## Overview

DeepMask exposes a set of read-only Outlook actions that let users read mail, browse calendars, look up contacts, and get intelligent summaries of their inbox — all scoped to what the signed-in user already has access to in your Microsoft 365 tenant.

Actions are grouped into four categories:

| Category     | Actions | Purpose                                            |
| ------------ | ------- | -------------------------------------------------- |
| **Mail**     | 6       | Read folders, messages, and attachments            |
| **Calendar** | 4       | Browse calendars and events                        |
| **Contacts** | 3       | Look up people in the address book                 |
| **Compound** | 2       | Intelligent inbox summaries and priority detection |

<Info>
  All Outlook actions are read-only. DeepMask cannot send, delete, or modify mail, events, or contacts. Every action runs on behalf of the signed-in user — they can only access content they already have permission to see.
</Info>

### Mail

| Action                     | Description                                                                          |
| -------------------------- | ------------------------------------------------------------------------------------ |
| `outlook_list_folders`     | Lists all mail folders in the mailbox (Inbox, Drafts, Sent Items, etc.).             |
| `outlook_list_messages`    | Lists messages in a folder, newest-first, with subject, sender, and a short preview. |
| `outlook_get_message`      | Returns the full content of a message by ID, including the complete body.            |
| `outlook_search_messages`  | Full-text KQL search across all messages — subject, body, sender, and recipients.    |
| `outlook_list_attachments` | Lists all attachments on a message — file name, type, and size.                      |
| `outlook_get_attachment`   | Downloads a specific attachment and returns its content.                             |

### Calendar

| Action                   | Description                                                                         |
| ------------------------ | ----------------------------------------------------------------------------------- |
| `outlook_list_calendars` | Lists all calendars in the user's account with edit permissions.                    |
| `outlook_list_events`    | Lists calendar events, optionally filtered by date range.                           |
| `outlook_get_event`      | Returns full details of a calendar event by ID, including attendees and recurrence. |
| `outlook_search_events`  | Full-text KQL search across calendar events.                                        |

### Contacts

| Action                    | Description                                                           |
| ------------------------- | --------------------------------------------------------------------- |
| `outlook_list_contacts`   | Lists contacts from the address book, alphabetically by display name. |
| `outlook_get_contact`     | Returns full details of a contact by ID.                              |
| `outlook_search_contacts` | Search contacts by name, email, company, or other fields.             |

### Compound

| Action                     | Description                                                                          |
| -------------------------- | ------------------------------------------------------------------------------------ |
| `outlook_catch_me_up`      | Returns a prioritized summary of recent inbox activity and upcoming calendar events. |
| `outlook_priority_replies` | Scans the inbox for messages that need a reply and threads waiting for a response.   |

***

## Prerequisites

Before using Outlook actions in DeepMask, confirm the following are in place.

### Required Access

* **Microsoft 365 account (Business Basic or higher)** — Your organization must have an active Microsoft 365 or Office 365 subscription with Exchange Online and Outlook enabled.
* **User signed in via Microsoft** — Each user must sign in with their own Microsoft account through DeepMask's connector. Actions run under that user's identity and are limited to content they already have access to.

### What You Do Not Need

* No developer tools, code, or command-line experience
* No changes to existing mailbox permissions
* No service account or shared credentials

<Info>
  DeepMask uses OAuth 2.0 delegated authentication. When a user connects their account, they sign in with their own Microsoft credentials. DeepMask never stores passwords or receives broader access than the user already has in your tenant.
</Info>

***

## Common Parameters

Several parameters appear across multiple actions.

| Parameter         | Type                       | Description                                                                                                       |
| ----------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `response_format` | `"markdown"` \| `"json"`   | Controls the output format. `"markdown"` (default) returns human-readable text; `"json"` returns structured data. |
| `limit`           | number (1–100, default 20) | Maximum number of results to return in a single call.                                                             |
| `offset`          | number (default 0)         | Number of results to skip. Use with `limit` to page through large result sets.                                    |

### Well-Known Folder IDs

Mail actions accept either a folder ID from `outlook_list_folders` or these well-known names:

| Name           | Folder        |
| -------------- | ------------- |
| `inbox`        | Inbox         |
| `drafts`       | Drafts        |
| `sentitems`    | Sent Items    |
| `deleteditems` | Deleted Items |
| `junkemail`    | Junk Email    |

***

## Typical Workflows

### Reading recent emails

<Steps>
  <Step title="List folders">
    Call `outlook_list_folders` to see all available mail folders and their IDs.
  </Step>

  <Step title="List messages">
    Call `outlook_list_messages` with a `folder_id` (e.g. `"inbox"`) to get messages newest-first.
  </Step>

  <Step title="Read a message">
    Call `outlook_get_message` with a `message_id` from the list to get the full body.
  </Step>

  <Step title="Check attachments">
    Call `outlook_list_attachments` with the `message_id`, then `outlook_get_attachment` with an `attachment_id` to download a file.
  </Step>
</Steps>

### Getting a daily briefing

<Steps>
  <Step title="Catch up on the inbox">
    Call `outlook_catch_me_up` with `hours_back` set to how far back to scan (default 24h) and `include_calendar=true` to also surface upcoming events.
  </Step>

  <Step title="Drill into priority items">
    Use the `message_id` values returned in `flagged` to call `outlook_get_message` for full context on the most urgent threads.
  </Step>
</Steps>

### Finding a specific email thread

<Steps>
  <Step title="Search messages">
    Call `outlook_search_messages` with a KQL query — e.g. `"from:alice@example.com subject:budget"`.
  </Step>

  <Step title="Read the full message">
    Pass a `message_id` from the results to `outlook_get_message`.
  </Step>
</Steps>

### Checking the calendar

<Steps>
  <Step title="List events for a date range">
    Call `outlook_list_events` with `start_datetime` and `end_datetime` in ISO 8601 UTC format — e.g. `"2024-06-01T00:00:00Z"`.
  </Step>

  <Step title="Get event details">
    Call `outlook_get_event` with an `event_id` to see the full attendee list, body, and recurrence info.
  </Step>
</Steps>

***

## Pagination

Actions that return lists support pagination via `limit` and `offset`.

| Field in response | Description                                                 |
| ----------------- | ----------------------------------------------------------- |
| `count`           | Number of items in this page                                |
| `has_more`        | `true` if there are more pages                              |
| `next_offset`     | Pass this as `offset` in the next call to get the next page |

<Info>
  `outlook_search_contacts` does not support offset paging. Results are unordered and a single page is returned up to the `limit`.
</Info>

***

## Security & Privacy

DeepMask is designed so that you retain full control of your data and your users' access. This section explains the key security properties of the Outlook integration.

### Delegated Authentication

DeepMask uses OAuth 2.0 delegated permissions, not application-level (app-only) permissions. This means:

* Every action performed by DeepMask is done on behalf of the signed-in user.
* A user can only read mail, calendar events, and contacts they already have access to.
* DeepMask cannot bypass Exchange Online's existing access controls.
* Removing a user's mailbox access in Microsoft 365 immediately removes their access in DeepMask.

### No Stored Credentials

DeepMask does not store your Microsoft password, your Client Secret, or raw mailbox content. Authentication is handled entirely through short-lived OAuth access tokens and refresh tokens, which are encrypted at rest.

### No Service Account

Unlike some integrations that use a single shared service account to access all data, DeepMask authenticates each user individually. This ensures audit logs in your Microsoft 365 tenant accurately reflect which user accessed which content.

### Read-Only Permissions

All active Outlook actions are strictly read-only. DeepMask requests no write, send, or delete permissions — it cannot send mail, create events, or modify contacts.

The delegated Microsoft Graph permissions used by these actions are:

| Permission       | Actions that use it                           |
| ---------------- | --------------------------------------------- |
| `User.Read`      | All actions (identity context)                |
| `Mail.Read`      | All mail actions                              |
| `Mail.ReadBasic` | Folder listing and message previews           |
| `Calendars.Read` | All calendar actions                          |
| `Contacts.Read`  | All contact actions                           |
| `offline_access` | Keeps the user's session active between calls |

<Info>
  If a user reports missing mail or calendar events, confirm that admin consent has been granted for all required permissions in your Azure AD app registration. See the [Enterprise Integration Setup](/docs/enterprise-integration-setup) guide for details.
</Info>

### Revoking Access

To disconnect DeepMask from Outlook at any time:

* In DeepMask → **Connectors** → **Microsoft (Enterprise)**, click **Disconnect**.

Either action immediately revokes all access tokens. No data is retained after disconnection.

<Info>
  Questions about data residency, compliance, or security? Contact DeepMask support at [support@deepmask.io](mailto:support@deepmask.io).
</Info>
