Home » Office 365 » Migrate IMAP to Office 365 Shared Mailbox in 3 Ways
Office 365 ~ 6 Minutes Reading

Migrate IMAP to Office 365 Shared Mailbox in 3 Ways

author
Published By Mohit Kumar Jha
Anuraag Singh
Approved By Anuraag Singh
Calendar
Published On February 18th, 2025
Migrating IMAP to Microsoft 365 Shared Mailboxes presents a licensing puzzle, especially for inactive accounts. Official guidance is limited, but solutions exist: Admin Center, PowerShell, or streamlined tools. Learn to use each one and figure out the best approach.

Organizations transitioning away from a self-hosted IMAP service to the M365 cloud often try to migrate IMAP to Office 365 Shared Mailbox to save some licensing costs.

As shared mailboxes can exist without a perpetual license and are accessible to multiple accounts the limited storage is considered a fair tradeoff for many.

However, the main struggle is the lack of official instructions on how to perform this transfer. Many admins have a mix of accounts and come with queries like:

“We’re migrating from an IMAP email system with a mix of active and inactive mailboxes, but we’re only licensing our active users. Can we migrate the inactive mailboxes directly into shared mailboxes without first assigning temporary licenses?”

Don’t worry we will teach you exactly how to do the transfer without procuring extra licenses. Let us start with the approach available in the M365 admin center.

Use Admin Center and Migrate IMAP to Office 365 Shared Mailbox

  1. Prepare Shared Mailbox (and Licensing Strategy)
  • Option A – Shared Mailbox with Temporary License:
    • In Microsoft 365 Admin Center > Users/Teams & groups  > Shared mailboxes.
    • Click + Add a shared mailbox.
    • Add Name and email address then Save. Select shared mailbox to give it a license.
  • Option B – Default IMAP to M365 User Migration:
    • Log in to the M365 admin center.
    • Users > Add user.
    • Enter user info.
    • Add up to 5 emails for sign-in.
    • Buy licenses & add.
  1. Find IMAP Server Name:
  • Open current IMAP webmail.
  • Navigate to the Settings menu to see the IMAP server name, address, Port, and Security type.
  1. Create CSV Migration File
  • Create CSV, Add headers in the first row, Populate CSV with corresponding EmailAddress, UserName, Password > Save
  1. Connect to IMAP System
  • Go to exchange.admin.microsoft.com.
  • Navigate to Migration.
  • Click Endpoints.
  • Click + Add migration endpoint.
  • Select IMAP.
  • Enter a Migration endpoint name.
  • Then, enter the IMAP server address, Port, and select the Security type.
  • Click Create.
  1. Migrate Mailboxes to Shared Mailbox
  • Go back to Migration in the EAC.
  • Click + Add migration batch.
  • Enter a Name for your migration batch.
  • Select Migrate to Exchange Online as Migration type > Next.
  • Select IMAP migration > Next.
  • Review prerequisites > Next.
  • Choose the Migration endpoint > Next.
  • Click Import CSV file and upload it > Next.
  • Configure filtering options if needed, > Next.
  • Configure reporting options as desired > Save > Done.
  • Select your newly created batch, and Start migration batch.
  1. Verify Migration in EAC
  • In the EAC Migration dashboard.
  • Select migration batch and view details.
  • Wait till you see “Synced” or “Completed”.
  1. Post-Migration Actions (Based on Licensing Option)
  • Option A – Temporary License Removal: Microsoft 365 Admin Center > Users > Shared mailboxes > Licenses > Remove.
  • Option B – Revoke & Convert Licensed Mailboxes: In EAC, User Mailbox > Convert to Shared Mailbox.
  1. Notify users.

PowerShell Cmdlets to Migrate IMAP to Shared Mailbox in Office 365

Option 1: Temporary License on Shared Mailbox

  1. Connect to Exchange Online PowerShell
  2. Create the Shared Mailbox

     New-Mailbox -Shared -Name "SharedMailboxName" -DisplayName "Shared Mailbox Display Name" -Alias "sharedmailboxalias" -UserPrincipalName "sharedmailbox@yourdomain.com"
  3. Assign a Temporary License

    $SharedMailboxUPN = "sharedmailbox@yourdomain.com"  # Replace accordingly
    $LicenseSKU = "YOUR_TEMPORARY_LICENSE_SKU"
    Set-MsolUserLicense -UserPrincipalName $SharedMailboxUPN -AddLicenses "$LicenseSKU"
  4. Prepare a CSV File
  5. Create the Migration Endpoint
    New-MigrationEndpoint -IMAP -Name SharedIMAPEndpoint -RemoteServer <IMAP FQDN> -Port <Port> -Security <Security Type>
  6. Start the Migration Batch
    New-MigrationBatch -Name IMAPtoSharedBatch -SourceEndpoint SharedIMAPEndpoint -CSVData ([System.IO.File]::ReadAllBytes("C:\Path\To\IMAPtoShared.csv")) -AutoStart
  7. Verify the Migration

    Get-MigrationBatch -Identity IMAPtoSharedBatch | Format-List Status
  8. Remove the Temporary License

    Set-MsolUserLicense -UserPrincipalName $SharedMailboxUPN -RemoveLicenses "$LicenseSKU"

Option 2: Convert Licensed User Mailboxes

  1. Connect to Exchange Online PowerShell
  2. Create Temporary Licensed User Mailboxes

    New-Mailbox -Name "TempMigrationUser1" -DisplayName "Temp Migration User 1" -Alias "tempuser1" -UserPrincipalName "tempuser1@yourdomain.com"
    New-Mailbox -Name "TempMigrationUser2" -DisplayName "Temp Migration User 2" -Alias "tempuser2" -UserPrincipalName "tempuser2@yourdomain.com"
  3. Assign Licenses to These Mailboxes

    $LicenseSKU = "YOUR_LICENSE_SKU"
    Set-MsolUserLicense -UserPrincipalName "tempuser1@yourdomain.com" -AddLicenses "$LicenseSKU"
    Set-MsolUserLicense -UserPrincipalName "tempuser2@yourdomain.com" -AddLicenses "$LicenseSKU"
  4. Create the Final Shared Mailbox (if not already created)

    New-Mailbox -Shared -Name "SharedMailboxName" -DisplayName "Shared Mailbox Display Name" -Alias "sharedmailboxalias" -UserPrincipalName "sharedmailbox@yourdomain.com"
  5. Prepare a CSV File for Temporary User Migration
  6. Create the Migration Endpoint

    New-MigrationEndpoint -IMAP -Name SharedIMAPEndpoint -RemoteServer <IMAP FQDN> -Port <Port> -Security <Security Type>
  7. Start the Migration Batch for Temporary Mailboxes

    New-MigrationBatch -Name IMAPtoUserMailboxesBatch -SourceEndpoint SharedIMAPEndpoint -CSVData ([System.IO.File]::ReadAllBytes("C:\Path\To\IMAPtoUserMailboxes.csv")) -AutoStart
  8. Verify the Migration

    Get-MigrationBatch -Identity IMAPtoUserMailboxesBatch | Format-List Status
  9. Convert Temporary User Mailboxes to Shared Mailboxes

    $UserMailboxesToConvert = Get-Mailbox -Filter { DisplayName -like "TempMigrationUser*" }
    foreach ($UserMailbox in $UserMailboxesToConvert) {
        Set-Mailbox -Identity $UserMailbox.Identity -Type Shared
    }
  10. Revoke Licenses from the Converted Shared Mailboxes

    $SharedMailboxesToUnlicense = Get-Mailbox -Shared -Filter { DisplayName -like "TempMigrationUser*" }
    foreach ($SharedMailbox in $SharedMailboxesToUnlicense) {
        $SharedMailboxUPN = $SharedMailbox.UserPrincipalName
        Get-MsolUser -UserPrincipalName $SharedMailboxUPN | Set-MsolUserLicense -RemoveLicenses
    }
  11. Assign Necessary Permissions to the Final Shared Mailbox

A Modern Tool for Migrating IMAP Accounts to Non-Licensed Office 365 Shared Mailboxes

SysTools IMAP to Office 365 Migration tool is your best-case scenario. With this too you no longer have to struggle with constant license assignment and removal steps you can perform the migration straightaway.

The entire functionality of the tool is contained in a GUI module so no complex scripts or other confusing steps are required for migration.

Moreover, with the presence of filters admins can extract the exact data they want. This is a major advantage in IMAP to shared mailbox transfer due to the latter’s strict storage limit of 50 GB.

Given all these advantages users might be surprised how easy it is to use the tool evident from the list of steps given below.

Step 1. Launch the tool on your machine and select endpoints IMAP and Microsoft 365 as source and destination respectively.

Step 2. Then, scroll to the Workload section and mark the box next to Emails. Apply a date filter via the calendar menu.

Step 3. On the source screen perform the validation ritual for the IMAP server and press next.

Step 4. Likewise, Validate the M365 admin account details and press Next to continue.

Step 5. Map the users via Fetch, Import, or Download template, we recommend that you use the Download template as it will allow you to mark the IgnoreLicense parameter as TRUE during user ingestion itself.

Step 6. Use the Preview section to see the list of users, select the ones you want to put in Shared mailboxes, and toggle show selected, if you dont see a ribbon icon, right-click and mark IgnoreLicense. Assign priority, Validate, and Start Migration.

Conclusion

Here we taught the readers how they can migrate IMAP to Office 365 shared mailbox. The default approach involving the admin center or PowerShell reviews additional lice assignments and revocation steps. These can be avoided by choosing the automated alternative instead.