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 only ('Tenant name only' - Single tenant) radio button.
- Click Register.
- Under the Manage menu, select Authentication.
- Set the option Allow public client flows to Yes.
- 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.
Important
If an API permission is named User.Read under Microsoft Graph is already present, this can be removed. The Microsoft Graph API does not apply to this project type and is not used. - Click + Add a permission.
- Select the Microsoft Graph API option from the Microsoft APIs tab (default window).
- You can choose between Delegated permissions or Application permissions. While the permissions are the same for both, they may differ based on your endpoint type (source or destination). Please review the minimum permissions for each endpoint type and select the appropriate option:
The following list outlines the minimum API permissions required for the source endpoint:
- Domain.Read.All
- Group.Read.All
- Group.Member.Read.All
- LicenseAssignment.Read.All
- RoleManagement.Read.Directory
- User.Read.All
The following list outlines the minimum API permissions required for the destination endpoint:
- Group.Read.Write.All
- Group.Member.Read.Write.All
- LicenseAssignment.ReadWrite.All
- User.Read.Write.All
- Click Add permissions.
- Click + Add a permission.
- Select APIs my organization uses.
- Scroll down or search for the Office 365 Exchange Online API permissions.
- Select Delegated Permissions.
- Select EWS and select the following permissions:
-
EWS.AccessAsUser.All
Important
This permission only allows the OAuth application (MigrationWiz) to be associated with EWS. This does not grant access to all mailbox data.
-
EWS.AccessAsUser.All
- Click Add permissions.
- Repeat steps 9 to 11.
- Select Application Permissions.
- Search for Other Permissions and select the following permissions:
- Click Add Permissions.
- Click Grant admin consent.
Warning
The image above reflects how your configuration should look like when using Delegated permissions for the source endpoint. This image will change according to your endpoint and permissions type. - Click Yes to confirm the settings. Under the Status column, you should see a message that permission has been granted for the domain.
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 on the Azure Portal after the secret client's 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 - 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.