Before you start the migration process, the user account that you will be using to migrate the mailboxes, should have admin rights and impersonate rights. Follow the steps given below to assign impersonate rights to a user account.

Assign impersonate rights in Exchange Server

You can use Exchange Management Shell (EMS) commands to set impersonation rights for Exchange 2013, 2016, and 2019.

Note:

1. If the login through administrator user fails then try to impersonate any other user.

2. Make sure the impersonated user account has impersonation permissions to each associated Mailbox (Users).

Execute the below commands on your Exchange Management Shell (Run as Administrator).

New-ManagementRoleAssignment -Role "ApplicationImpersonation" -User "user-id here"

Execute the below commands on your Exchange Management Shell (Run as Administrator)

To check if the impersonation rights have been assigned to the user, enter the command given below:

To check if the impersonation rights have been assigned to the user, enter the command given below:

Get-ManagementRoleAssignment -RoleAssignee "user-id here" -Role ApplicationImpersonation -RoleAssigneeType user

1.3 Remove impersonation rights:

Get-ManagementRoleAssignment -RoleAssignee "user id here" -Role ApplicationImpersonation -RoleAssigneeType user | Remove-ManagementRoleAssignment

1.3 Remove impersonation rights:

2. Assign impersonate rights in the Exchange Server using the Exchange Admin Center:

On the machine where you have installed your Exchange Server, Open the browser (preferably Chrome) and type the URL: https://localhost/ecp. Then follow the steps given below:

  1. Enter the login credentials of your Administrator account with the domain name in the "Exchange Admin Center" login screen as shown below.

    Enter the login credentials of your Administrator account with the domain name in the
     
  2. Click on Permissions tab and then double click on the Discovery Management role group as shown below.

    Click on Permissions tab and then double click on the Discovery Management role group as shown below.
     
  3. In the Role Group screen, check if ApplicationImpersonation is added in the roles. If not click on the + icon add the role. Then, in the Members section click on + and add the user to whom you want to assign this role.

    In the Role Group screen, check if ApplicationImpersonation is added in the roles. If not click on the + icon add the role. Then, in the Members section click on + and add the user to whom you want to assign this role.
     
  4. Click the Save button to complete the Impersonation Rights setting.

Assign impersonate rights in MS Office365

Assign Impersonate rights using PowerShell cmdlet

  1. Click on the Windows Start button.
  2. Search for Windows PowerShell (PowerShell should already be installed).
  3. Start PowerShell with administrator privileges (right-click -> run as administrator).

Step 1: If the Exchange Online PowerShell module is not installed, run the following command:

Install-Module -Name ExchangeOnlineManagement

Step 1: If the Exchange Online PowerShell module is not installed, run the following command:

Step 2: Connect to your Microsoft 365 account using the Global Admin account when the login is prompted. Run the following command:

Connect-ExchangeOnline

Enter the User Name (SMTP) and Password of Office 365 account having Global Admin credentials.

Enter the User Name (SMTP) and Password of Office 365 account having Global Admin credentials.

Step 3: Run the below command to enable organization customization

Enable-OrganizationCustomization

Ignore this results if the error is "This operation is not required. Organization is already enabled for customization."

Ignore this results if the error is

Step 4: Run the below command to assign the 'ApplicationImpersonation' role to the admin

New-ManagementRoleAssignment -Role "ApplicationImpersonation" -User user@domain.com

New-ManagementRoleAssignment -Role

Set impersonation rights using Microsoft 365 Admin Center

  1. Open www.office.com
  2. Enter the credentials of your Office 365 user global admin credentials.
  3. Open Microsoft 365 admin center.
  4. Click Roles
  5. Click Role Assignments

    Click Role Assignments

     
  6. Click the Exchange Tab

    Click the Exchange Tab
     
  7. Click Discovery Management and then select the permission tab, and select Applicationimpersonation 

    Click Discovery Management and then select the permission tab, and select Applicationimpersonation 
     
  8. Select Assigned Tab select User, and click on Add

    Select Assigned Tab select User, and click on Add