This article provides all the necessary information to set up your environment for Exchange Online (Microsoft 365) to Exchange Online (Microsoft 365) using coexistence migrations when applying licenses to target mailboxes. The approach outlined in the article is important to follow as it contains new information about the setup of the tenant, the application registration, the transition to Microsoft Graph API, and the assignment of permissions.
Important
Keep in mind that the Apply Licenses to Target Mailboxes during the Pre-Stage Process option is configured when creating your project and can be changed at the Source/Destination tab of your Advanced Options.
The quick checklist below outlines the basic steps covered in detail in this article. These steps allow for the process of replacing the application impersonation.
- Create a new Application Registration
- Assign the API Permissions and Grant Admin Consent
- Obtain the AppID and TenantID from the Application Registration
- Create a Client Secret
- Set up your MigrationWiz Project
Considerations
-
The following replacement only applies to Exchange Online (Microsoft 365) to Exchange Online (Microsoft 365) using coexistence migrations when the Apply Licenses to Target Mailboxes during Pre-Stage Process checkbox is enabled in your advanced options' Source/Destination tab.
Tip
In case you perform an Exchange Online (Microsoft 365) to Exchange Online (Microsoft 365) using coexistence without applying licenses to target mailboxes please use this guide to complete your migration.
- You can only perform the recommended replacement with Administrator credentials. If you use end-user credentials you should use the delegated permissions process.
- The Use Impersonation to Authenticate checkbox must be enabled in your advanced options' Source/Destination tab.
Otherwise, the following error might arise.
Step One - Create a New Application Registration
Create a new Application Registration in the Microsoft 365 tenant source or destination.
- Log in to the Microsoft Entra admin center with a Global Administrator login.
- Click View all products and select Microsoft ID (Azure AD) in the Microsoft Entra Admin Center.
- In the left sidebar, open the Applications dropdown list and select App Registrations, which is found under the Identity dropdown list.
- Select New Registration at the top of the screen.
- Give the app a distinct name. You can change this later if necessary.
- Select the Accounts in this organizational directory ('Tenant name only' - Single tenant) radio button.
- Click Register.
- Under the Manage menu, select Authentication (preview).
- Select the Settings tab.
- Set the option Allow public client flows to Enabled.
- Under the Supported Account types, select Accounts in this organizational directory ('Tenant name only' - Single tenant).
- Click Save.
Step Two - Assign the API Permissions and Grant Admin Consent
The following steps allow you to assign the API permission and grant consent to the necessary M365 components.
- From the Manage menu, select API permissions.
- Click Add a Permission.
- Select APIs my organization uses.
- Scroll down or search for the following permissions Office 365 Exchange Online.
- Select Application Permissions.
- Check the box under Other Permissions for full_access_as_app.
- Check the box under Exchange for Exchange.ManageAsApp.
- Click Add Permissions.
- Repeat Step 2 and select Delegated Permissions.
- Check the box under Directory for EWS.AccessAsUser.All.
- Click Add Permissions.
- Now repeat Step 2 and select Microsoft APIs > Microsoft Graph.
- Select Application Permissions.
- Check the box under Directory for Directory.ReadWrite.All.
- Click Add Permissions.
- Click Grant admin consent.
- Click Yes to confirm the settings. Under the Status column, you should see a message that permission has been granted for the domain. Your API scopes should look like the following:
Step Three - Obtain the AppID and TenantID from the Application Registration
Follow the steps below to obtain the AppID and TenantID from the Application Registration.
- Navigate to the App Registrations item as shown below. In the Overview tab, you will find the Application (client) ID and the Directory (Tenant) ID.
- Copy both of these to another application, such as Notepad, for use later in this process. This is needed for the MigrationWiz Project Setup.
Step Four - Create a Client Secret
Create a Client Secret for the application by following the steps below.
- Go to Manage > Certificates & secrets from the left sidebar.
- Create a new secret client by clicking + New client secret.
- Copy and save the client secrets' value on a notepad or other preferred tool.
Warning
Consider that the secret client's value is only available until the first time you sign off the Azure Portal after the secret client creation. After that, it will be no longer visible.
In case you lost the value, please create a new client secret as suggested above and use it in the steps below.
Step Five - Grant Exchange Administrator Role
Grant the Exchange Administrator Role to your app by following the steps below.
- Go to Entra ID> Roles & admins from the left sidebar.
- In the search bar, type Exchange Administrator and click on it.
- On the Assignments page, click the button to Add assignments.
- In the search bar, enter the name of the app or its Application ID.
- Select your app from the list.
-
Add to confirm the assignment. A confirmation message will appear after the permission is granted.
Warning
This role process might take up to 30 minutes to take effect.
Important
App password usage, MFA/2FA, SSO, and ADFS are not supported for the migration service account when using Application Permissions. However, users being migrated to your project can have these security features enabled.
Step Six - Set up your MigrationWiz Project
Add the details from the Application Registration into the MigrationWiz project.
- Create your migration project.
- Set up your Endpoints. During this setup, you will be asked for:
- Application (Client) ID - Obtained in Step Three
- Directory (Tenant) ID - Obtained in Step Three
-
Client Secret - Obtained in Step Four
Tip
The Client Secret value is not mandatory if you use Delegated permissions, if that is the case, please leave the Client Secret field empty. If you are using Application permissions, you must add the Client Secret.
The correct Application and Directory IDs must be used, from the App Registration screen. These are NOT the values you used in running the ConfigureM365Tenant script above. They are obtained from Step Three and Step Four in these instructions.
Advanced Options
Support Tab
The following support options will appear in the Advanced Options depending on the Microsoft 365 endpoints defined in your project.
- ModernAuthClientSecretExport=xxxxxxxxxxxx Where the value is the client secret's value for M365 endpoints at the source.
- ModernAuthClientSecretImport=xxxxxxxxxxxx Where the value is the client secret's value for M365 endpoints at the destination.
These values can only be modified by editing your project's endpoints.
Having the Client Secret with a value in the dialog box notifies the system that you are using the new way of authenticating in the M365 environment. If you are still using the Application Impersonation method, then do not enter a client secret into this box.
Finally, you should add some advanced options when using Delegated permissions. Otherwise, you do not need any of the following advanced options when using Application permissions.
-
Delegated Permissions at the source and destination
Below you can find the mandatory AO at the source.
- UseApplicationPermissionAtSource=0
Below you can find the mandatory AO at the destination.
- UseApplicationPermissionAtDestination=0
-
Delegated Permissions at the source only
Below you can find the mandatory AO at the source.
- UseApplicationPermission=1
- UseApplicationPermissionAtSource=0
There are not any AOs at the destination.
-
Delegated Permissions at the destination only
Below you can find the mandatory AO at the source.
- UseApplicationPermission=1
Below you can find the mandatory AO at the destination.
- UseApplicationPermissionAtDestination=0
Source/Destination Tab
Ensure that the following advanced options are enabled:
- Use Impersonation to Authenticate at source and destination endpoints.
-
Apply Licenses to Target Mailboxes during Pre-Stage Process.
In case of any questions or concerns about this new method, contact our support team.