Bulk Migrate Microsoft 365 to TrekMail
Check whether each Microsoft mailbox permits password-based IMAP before preparing a CSV, and use an OAuth-capable migration path when it does not.
Article details
Type, difficulty, plans, and last updated info.
▼
Article details
Type, difficulty, plans, and last updated info.
- Type
- Guide
- Difficulty
- Intermediate
- Plans
- Starter · Pro · Agency
- Last updated
- Sep 9, 2026
Use Bulk Import to move mail from Microsoft 365 or Outlook.com mailboxes into existing TrekMail mailboxes. It copies email folders and messages. It does not move calendars, contacts, or Microsoft account settings.
The current TrekMail importer signs in to a source over direct IMAP with a username and password. It does not complete Microsoft's interactive OAuth consent flow. Exchange Online has disabled Basic authentication for IMAP, and an app password does not bypass that block. As a result, most current Microsoft 365 tenants cannot use this password-based import directly.
Do not disable security defaults, MFA, or modern authentication to make an import work. Ask the Microsoft 365 administrator whether the source is a service that still provides a supported direct IMAP credential. If Microsoft requires OAuth, use a migration method that supports Microsoft OAuth or export the mail through an approved Microsoft tool, then contact TrekMail support about a compatible import path.
Before you create the CSV
- Create every destination TrekMail mailbox first.
- Ask the Microsoft 365 administrator which source service hosts the mailbox and whether it offers a supported direct IMAP username and password. Exchange Online normally requires OAuth and is not compatible with this importer today.
- Test one noncritical mailbox before collecting credentials for a group.
- Keep the CSV secure. It contains credentials, so do not share it in chat, tickets, repositories, or broadly shared cloud folders. Delete it after the migration is verified.
Microsoft's current guidance says that Basic authentication is disabled in Exchange Online and that blocking it also blocks app passwords. Microsoft applications that access IMAP must use OAuth. See Microsoft's Basic authentication guidance before planning the batch.
Use the Outlook provider
Only continue here if the administrator has confirmed a compatible direct IMAP credential. In Import > Bulk Import, select Outlook. TrekMail fills in the common Exchange Online IMAP network settings:
| Setting | Value |
|---|---|
| Host | outlook.office365.com |
| Port | 993 |
| Security | SSL |
These host settings do not solve authentication: Exchange Online still requires OAuth. If the source administrator gives different settings for another Microsoft-hosted or on-premises service that permits direct IMAP credentials, use Other and enter the approved settings. Do not swap hosts or security settings based on an old forum post.
Create the CSV
When every source mailbox uses the Outlook settings above, use the simple three-column format:
source_email,source_password,destination_email
alice@old-company.example,approved-direct-imap-password,alice@new-company.example
bob@old-company.example,approved-direct-imap-password,bob@new-company.example
source_emailis the Microsoft 365 mailbox to copy.source_passwordis the compatible direct IMAP credential approved for that mailbox. It cannot be a Microsoft OAuth token, and an Exchange Online app password will not restore disabled Basic authentication.destination_emailis an existing TrekMail mailbox.
Use the source mailbox's usual email address. Do not substitute an administrator address for every user. The bulk importer signs in to each source mailbox separately.
Run and verify the batch
- Paste or upload the CSV in Bulk Import.
- Select Preview & validate. This checks the file and destination mappings, but it does not sign in to every Microsoft mailbox yet.
- Fix invalid rows and preview again.
- Choose a folder strategy. Preserve folder tree is best for a full move. Only INBOX + Sent is appropriate only when a limited history is intentional.
- Keep Skip duplicates selected, name the batch if helpful, and select Start.
- Review the batch page as it runs. Open any failed row to see its current error and use Continue incomplete only after resolving it.
Microsoft may throttle or reject connections according to the tenant's policy and current service conditions. There is no reliable time estimate for a batch. Keep the source mailboxes active until the destination mailboxes and important folders have been checked.
Shared and special mailboxes
The bulk format expects a direct IMAP sign-in for every row. Shared, room, equipment, or delegated mailboxes may not have a suitable direct credential. Do not assume that a user's password grants the importer access to a shared mailbox.
For these mailboxes, confirm the source provider's supported IMAP access with the Microsoft 365 administrator and test a single noncritical import first. Calendar and booking data are outside this email-only import.
Common problems
- Authentication failed on Exchange Online: Stop retrying the password. The tenant probably requires OAuth, which this importer does not currently perform. Ask the administrator for an approved OAuth-capable migration or export path.
- The organization does not allow direct IMAP credentials: This is a security boundary, not something to bypass in TrekMail. Do not enable legacy authentication for the migration.
- Many rows wait or fail with connection errors: Check the individual error message and allow for Microsoft-side limits. Split the project into smaller batches only after the underlying access issue is understood.
- A migration is partly complete: Use the batch's Continue incomplete action after fixing the source issue. It is safer than starting a duplicate batch.
Plan the email cutover
Before changing MX records or reducing Microsoft licenses, check representative source and destination folders and confirm that new incoming mail reaches the intended service. A later batch with Skip duplicates selected can help catch up messages that arrived after an earlier import.
Related articles
Jump to nearby guides that continue the workflow.