Move Office 365 Mailbox to Another User Account Using Step by Step Guide

author
Published By Mohit Jha
Anuraag Singh
Approved By Anuraag Singh
Published On July 11th, 2023
Reading Time 9 Minutes Reading
Category Office 365

Summary: This guide provides complete insights into the process of moving an Office 365 mailbox to another user account. If you have similar queries, then go through the complete step-by-step guide to execute this task without any data loss or hassle. As we have discussed two ways to deal with this situation: using PowerShell and a reliable automated solution.

Oftentimes, it is needed to perform batch migration from one Office 365 account to another account in various scenarios like a Merger, Acquisition, Rebranding, etc. Being an Office 365 Admin, it becomes tough to work to execute, since, there is no such software offered by Microsoft. Hence, in this post, we have explained the best possible solution to move Office 365 mailbox to another user account. So, let us begin.

Reasons for Transfer Mailboxes from One O365 Account to Another

There are several reasons why you may want to move an Office 365 mailbox to another user account:

  • Employee turnover – When an employee leaves an organization, their mailbox needs to be reassigned to a new employee or manager.
  • Reorganization – When an organization goes through a restructuring, mailboxes may need to be moved to different departments or managers.
  • Mergers and acquisitions – During a merger or acquisition, mailboxes need to be consolidated and merged into one account.
  • Compliance – In certain cases, mailboxes need to be moved to meet compliance requirements or to support eDiscovery efforts.
  • Improved collaboration – In some cases, moving a mailbox to another user account can improve collaboration and productivity within a team.

Last but not least, when a user account is corrupted or inaccessible, then.

Workaround Solution to Copy Mailboxes from One O365 Account to Another

A user has to follow the given set of instructions to move Office 365 mailbox to another user account.

Step 1: Start to Plan Before 3 Days

Prepare Primary and Aimed Accounts: To make modifications to the processing accounts, follow these set of instructions:

  1. Make sure that a particular destination tenant is for the source Exchange Online domain.
  2. Add the source account to the destination Office 365 account. Create a TXT record when you are done with this.
  3. DNS record needs 72 hours to exhibit circulation
    Note: Make sure that the source and destination tenant mailboxes are not used by any other application.

Office 365 Cross-Tenant Migration Platform Setup

  • Generate a list of mailboxes of all which are to be migrated
  • Map the targeted and source tenant mailboxes, if it is required to include them.

Preparation of Office 365 Source Account

  • Delete the targeted email ID of the Office 365 tenant wherever it is configured.
  • Reset all the URLs to the initial point if the account configuration is complete
  • Remove Microsoft Lync licensing with the help of the Lync admin portal
  • Create a setting where the default email ID of the mailboxes of the targeted account has been entered. Once the procedure till now is complete, reset all the email addresses on rooms, distribution lists, and resources to the initial point.

Preparation of Office 365 Target Account

  • If you are using AD-FS then, launch the target Office 365 account and generate new domains within it.
  • Grant all the permissions and licenses needed for migration to another new account for Office 365 tenant migration
  • Establish the primary account as a basic mailing address
  • In case, the user is not using the password sync feature or AD-FS then, the password of every mailbox is to be mentioned in the account domain
  • Check the mail flow to see how the account works in different environments.

Step 2: Change the Passwords in Batch

  1. Launch an Excel spreadsheet and generate a CSV file and name it ‘password.csv’
  2. In this Excel file, make two columns with the name ‘upn’ and ‘password’
  3. Insert all the account credentials in this sheet
  4. Run MS Exchange PowerShell window and execute the following command to perform Office 365 tenant-to-tenant migration:
    Import-Csv password.csv|%{Set-MsolUserPassword –userPrincipalName 
    $_.upn -NewPassword $_.newpassword -ForceChangePassword $false}

Step 3: Copy the Messages

Execute these PowerShell commands to start copying messages from the basic domain to any particular proxy addresses present in the CSV file:

# Script: showproxies.ps1

# Copies all accounts in Office 365 that contain/don't contain a specific 

# proxyaddress to a .CSV file (addresses.csv) 

#  

# Change the following variable to the proxy address string you want to find:

# $proxyaddr = "onmicrosoft.com"  

################################################################################


$proxyaddr = "onmicrosoft.com" 


# Create an object to hold the results

$addresses = @()  

# Get every mailbox in the Exchange Organization

$Mailboxes = Get-Mailbox -ResultSize Unlimited

# Loop through the mailboxes

ForEach ($mbx in $Mailboxes) {  

    # Loop through every address assigned to the mailbox

    Foreach ($address in $mbx.EmailAddresses) {  

       # If it contains XXX,  Record it  

        if ($address.ToString().ToLower().contains("onmicrosoft.com")) {  

            # This is an email address. Add it to the list  

            $obj = "" | Select-Object Alias,EmailAddress  

            $obj.Alias = $mbx.Alias  

            $obj.EmailAddress = $address.ToString() #.SubString(10)  

            $addresses += $obj  

      }  

    }  

}  

# Export the final object to a csv in the working directory 
 
$addresses | Export-Csv addresses.csv -NoTypeInformation  

# Open the csv with the default handler  

Invoke-Item addresses.csv 
 
##### END OF SHOWPROXIES.PS1

Step 4: For Office 365 Tenant, Create a Room Mailbox

Follow these commands to perform Office 365 cross-tenant migration:

Script: create-rooms.ps1

#  Description:*** RUN THIS SCRIPT FROM A WINDOWS POWERSHELL SESSION ***

#This script creates Room mailboxes in Office 365.

# Syntax:Create-Rooms.ps1 -inputfile "file name.csv"

#

# Dependencies: Input file should contain 3 columns: RoomName, RoomSMTPAddress, RoomCapacity

#

################################################################################


param( $inputFile )


Function Usage

{

$strScriptFileName = ($MyInvocation.ScriptName).substring(($MyInvocation.ScriptName).lastindexofany("\") + 1).ToString()


@"


NAME:

$strScriptFileName

EXAMPLE:

C:\PS> .\$strScriptFileName -inputfile `"file name.csv`"


"@

}


If (-not $inputFile) {Usage;Exit}



#Get MSO creds and initialize session

If ($cred -eq $NULL) {$Global:cred = Get-Credential}


#

If ($ExchRemoteCmdlets.AccessMode -ne "ReadWrite")

{

Write-Host

Write-Host Connecting to Office 365...

Write-Host

$NewSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 
https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection

$Global:ExchRemoteCmdlets = Import-PSSession $NewSession

}


#Import the CSV file

$csv = Import-CSV $inputfile


#Create Rooms contained in the CSV file

$csv | foreach-object{


New-mailbox -Name $_.RoomName -room -primarysmtpaddress $_.RoomSMTPAddress -resourcecapacity $_.RoomCapacity


}

##### END OF CREATE-ROOMS.PS1

Step 5: Delete The Secondary Addresses from Office 365 Mailboxes

Run the following commands:

#Script:  remove-proxy.ps1

#Description:*** RUN THIS SCRIPT FROM A WINDOWS POWERSHELL SESSION ***

#This script will remove a secondary email address from many users 

#

# Syntax:remove-proxy.ps1 -inputfile "filename.csv"

#

# Dependencies:Input file should contain 2 columns: Username, Emailsuffix 

#               Example:  Username=tim, Emailsuffix=fabrikam.com 

#Script will remove the address tim@fabrikam.com from the mailbox for Tim.

#NOTE: Address must be secondary; it will not remove primary email address.

#

################################################################################


param( $inputFile )


Function Usage

{

$strScriptFileName = ($MyInvocation.ScriptName).substring(($MyInvocation.ScriptName).lastindexofany


("\") + 1).ToString()


@"


NAME:

$strScriptFileName


EXAMPLE:

C:\PS> .\$strScriptFileName -inputfile `"file name.csv`"


"@

}


If (-not $inputFile) {Usage;Exit}



#Get MSO creds and initialize session

If ($cred -eq $NULL) {$Global:cred = Get-Credential}


#

If ($ExchRemoteCmdlets.AccessMode -ne "ReadWrite")

{

Write-Host

Write-Host Connecting to Office 365...

Write-Host

$NewSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 


https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection

$Global:ExchRemoteCmdlets = Import-PSSession $NewSession

}


#Import the CSV file and change primary smtp address


$csv = Import-CSV $inputfile

$csv | foreach-object{



# Set variable for email address to remove

$removeaddr = $_.username + "@" + $_.emailsuffix

Write-Host ("Processing User: " + $_.UserName +" - Removing " + $removeaddr)


Set-Mailbox $_.Username -EmailAddresses @{Remove=$removeaddr} 


}


##### END OF REMOVE-PROXY.PS1

Run Software to Transfer Office 365 Mailboxes to Another User Account 

We suggest you SysTools Office 365 to Office 365 Migration Tool to migrate data from Office 365 account to another Office 365 account. This tool is specially developed to move emails, contacts, calendars & documents from one Office 365 account to another without getting into the PowerShell scripts.

Here are Some of the Highlighted Features of this Tool:

Migrate users, admin, and domain user mailboxes from one Office 365 account to another.

  • Provides a date-based filter option to migrate selective data.
  • User mapping option to create the mapping between source & destination.
  • Capable to migrate Office 365 groups to destination.
  • Support bulk Office 365 mailbox migration.
  • Provides delta migration option to migrate newly arrived data.
  • Support account-based priority migration.

Download Now Purchase Now

Software Steps to Migrate from One Office 365 Account to Another User Account

Step 1. Install & run the software, and select Office 365 as a source & as a destination.

Step 2. Select required mailbox items such as emails, contacts, calendars, and documents from the workload selection.

Step 3. The tool provides a Date filter for selective migration, and you can also Migrate document permissions and Use Group mapping options. You can apply these options from the same screen. After that click on Next.

Step 4. Now, enter Office 365 source Admin Email & Application ID, then click on the Validate button to validate permissions.

Step 5. After validating permissions by software, click on Next.

Step 6. Now, enter Office 365 destination Admin ID & Application ID then click on the Validate button.

Step 7. Once permissions are validated click on the Next button.

Step 8. Now, we have to create a mapping between source & destination Office 365 users. To do this software provides three options Import Users, Fetch Users, and Download Template. Select any one option for user mapping.

Step 9. Once, the mapping gets successfully created between the users. Then click on the Validate button to validate permissions.

Step 10. Once permissions are validated click on the Start Migration button to migrate the mailboxes from one account to another.

Also Check: How to Import PST to Outlook 365 In Few Steps? Everything You Need to Know

The Final Verdict

Various Office 365 users have demanded an answer to their query, i.e., “How to move the mailboxes from one account to another?” The post deals with the best possible solution to perform this operation without any data loss or downtime. Moreover, users can use the free trial of the above-mentioned tool to migrate two users’ accounts for free.

Office 365 Migration Services