# Importing Exchange Online Archives

### Why use EWS

MSGraph is the preferred protocol for imports from Exchange Online, however it cannot currently be used to access Exchange Online Archive mailboxes and public folders.

Exchange Web Services is a legacy protocol which can be used to access Exchange Online, but is due to be disabled in October 2026.

<https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-ews-exchange-online>

Whilst Microsoft works to bridge the functionality gap between EWS we will continue to use EWS, switching to MSGraph at the earliest opportunity.

### Configuring a Mailbox Reader Connection

Go to **Mailbox Reader** > **Connection Settings**

Create a **New Connection** to the source mail system.

Set the Protocol to EWS and select your M365 OAuth connection first as this will hide unnecessary options.

Use the following values:

| Field                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Value                   |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
| Mode                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Multiple Mailboxes      |
| **Protocol**                           | Protocol that will be used for the new connection.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `EWS`                   |
| **Server**                             | Server’s URL hostname that would correspond to the Exchange server certificate, as you would use when using OWA. In this example, we would access our own mailboxes in OWA with this URL <https://mail.solar-archive.com/owa>. So use the hostname from that URL.                                                                                                                                                                                                                                                  | `outlook.office365.com` |
| OAuth Connection                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                         |
| Tenant ID                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                         |
| **Domain**                             | Domain of the mailbox reader connection. Depending on network requirements, this may or may not be needed.                                                                                                                                                                                                                                                                                                                                                                                                         |                         |
| **Port**                               | Port number that will be used for the new connection. For EWS this will always be the standard https port, which is 443.                                                                                                                                                                                                                                                                                                                                                                                           |                         |
| **Enable this Connection**             | Specifies whether this connection is enabled or not.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                         |
| **Separate log file per user account** | Specifies whether each user account will have a separate log file.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                         |
| **Skip Completed Mailboxes**           | Specifies whether or not completed mailboxes should be skipped.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                         |
| **Idle Alert Period**                  | Time, in hours, after which an alert will be raised if no emails are downloaded.                                                                                                                                                                                                                                                                                                                                                                                                                                   |                         |
| **Connection Type**                    | Mailbox reader connection type. For EWS this will always be https:                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                         |
| **Include Folders**                    | <p>Folders from which messages should be downloaded. Generally, this will be from ALL folders – so the \* wildcard can be used. Otherwise a comma separated set of folder names can be provided. For Sub Folders, you will need to enter the full path – each part separated by a forward slash. For example: inbox/archive mail/\*,sent mail.</p><p><br><em><strong>Note</strong>: The \* will mean that non-email folders will be accessed.</em></p>                                                             |                         |
| **Exclude Folders**                    | Refers to the Folders from which messages should not be downloaded.                                                                                                                                                                                                                                                                                                                                                                                                                                                |                         |
| Ignore Non Email Items                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                         |
| **Run Mode**                           | This will say “Polling” if there is no END DATE for mail collection. Without an end date, the system will need to repeatedly scan mailboxes which is a technique used to archive mail from systems that do not have a Journaling feature (like Hotmail / Gmail / Live mail / other IMAP or POP3 sources). If an end-date is specified, then the Run Mode will say “Date Limited”. The summary information that is displayed during mailbox collection will be different between Polling mode vs Date Limited mode. |                         |
| **Selection Range**                    | Range based on which messages should be downloaded.                                                                                                                                                                                                                                                                                                                                                                                                                                                                |                         |
| **Start Date & Time**                  | Time stamp from which messages should be downloaded.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                         |
| **End Date & Time**                    | Time stamp till which messages should be downloaded.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                         |
| Download from                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                         |


---

# Agent Instructions: 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:

```
GET https://help.solar-archive.com/docs/quick-start/importing-old-email/importing-exchange-online-archives.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
