New companies usually start with Gmail as their primary email system which caters to the needs of individuals and organizations of various sizes. With business growth, they migrate to Office 365 after their requirements start getting more complex realizing the suitability of Office 365 for enterprise-level uses. Especially in the corporate world, Office 365 is a go-to product for business productivity
There are various methods of migration for moving IMAP mailboxes to Office 365. If you have a little number of mailboxes to migrate, you can export the PST file from Gmail (in Outlook) to Office 365 (in Outlook). There are many tools available to perform this, or you can contact the Office 365 migration service provider to do this task for you. There is also another way to migrate using Fastrack Specialists from Microsoft if the environment is big enough. Your Google environment should consist of APIs and Admin SDK which are enabled for extended functionalities.
Also, manual IMAP migrations can be performed by the user, but contacts and calendar information will not be migrated.
Here are a few limitations to consider before moving on with the migration.
- Only items in a user’s inbox or other mail folders will migrate. Contacts, calendar items, or tasks will not be migrated. Although, later on, you can import/export contacts/calendars using Outlook.
- A maximum number of 500,000 items for a user’s mailbox will be migrated. Do note that emails will be migrated from newest to oldest.
- The biggest email that can be migrated will be of 35 MB in size.
- If the connections to your Gmail are limited then increase these connections limits to improve migration performance. Connection limits usually include client/server total connections, IP address connections and per-user connections on the server/firewall.
The Steps Required to Migrate from Gmail to Office 365
The following major steps will be used during the migration process.
The first step would be to sign up for Office 365 if not done already. If you are not sure about which subscription of Office 365 to choose, go with the most basic version if it fulfills your requirements and then, later on, you can add other things on top of it. For details, you can compare Office 365 plans.
Once you sign-up, you’ll create an account which will be an admin account. Later on, if you want, you can change this account to a regular account and make some other account as an administrator. We will need an administrator account of Office 365 to complete the migration operation.
Gmail views Outlook as a less secure app and thus G suite users are required to use a password and 2-step verification to connect the app to Office 365. If you are not going to use users’ mailbox with Outlook till the completion of migration, then there is no need to use password and 2-step verification.
For the migration, users’ mailboxes will be initially created in office 365, and then connected to the corresponding Gmail mailboxes. The emails will be syncing on an on-going basis until you make the final cut-over, which will enable users to send and receive emails via Gmail and the syncing is taking place in the background until the final cut-over is made.
Step-2: Verify Your Domain in Office 365
Firstly, the user must verify to Office 365 that he owns the domain which is used for the Gmail Account. If you can successfully log-in to your domain registrar account, you can create the DNS record for your domain. This is enough for Office 365 that you own the domain name. If you are having issues with logging-in the domain registrar account, then you can opt to use
as the domain, which is part of their Office 365 subscription and then add users to Office 365.
If you opted for domain verification, you will be prompted to complete this during the Office 365 setup by adding the TXT record that the setup wizard provides at the company’s domain host provider.
- Login to Office 365 portal.
- Now click on the “Admin” tile from the home page and you will be redirected to the “Admin Center”.
- A message will be showing that “Your office 365 setup is incomplete”. Click on “Go to setup” from here.
- In the options select “Add a domain”.
- Then check on the radio button of “I already own a domain” and then type in your domain name and click on next.
- Verify domain: Now Office 365 will automatically find out who is the domain provider and following 2 options will be shown:
- Sign-in to domain provider: In this option, you will be redirected to the domain provider webpage, and you just have to sign-in using your domain provider credentials. This will confirm to Microsoft that you own this domain.
- Verify TXT record: If you cannot or do not want to use the above option, then manually adding the TXT value given by Microsoft to the domain will verify the domain. You will be given a TXT name, TXT value, and TTL.
- Enter these values in your domain record and then come back to this page and then click on “Verify”. Following is an example TXT record:
TXT name: @
TXT Value: MS=ms1234567
Step-3: Create User Mailboxes & Assign Office 365 Licenses
Before creating users, make sure that you have purchased the appropriate number of licenses for the users. For example, if you want to add 20 users, first get the license for 20 users. You can also add the users and assign the license later. But for bulk addition, it is a good idea to assign the licenses at this stage, as it will be easier now.
- Open the “Admin Center” of office 365, then click on “Billing”.
- Now click on “Subscription”.
- And then click on “Add/remove licenses”.
- Now select the total number of licenses you want to purchase.
- In the “Admin Center” click on the “Users”
- Then click on “Active Users”.
- Now click on the “More” button
- If you just want to add only a few users then add them one-by-one by just clicking on “Add a user” from the screen of the previous step and then manually enter the values.
- You will also be given the “Import Multiple Users” option by using a CSV file.
- Create a CSV file (an MS Excel file) with the following headings row in the same order:
- User Name. Remember the email address of the user in the format firstname.lastname@example.org will be entered in the “User Name” column.
- First Name
- Last Name
- Display Name
- Job Title
- Office Number
- Office Phone
- Mobile Phone
- State or Province
- ZIP or Postal Code
- Country or Region.
- When “Import Multiple Users” is clicked, the user is given the option to download a sample excel file, which can also be used as a reference to add the users.
- Now from the 2nd line, start adding users’ details in each line. For example, if you want to add 20 users in Office 365, this excel file will have 21 rows. The 1st row is the header row, and the next 20 lines will be filled with the users’ details.
- Now when your CSV file is ready, click on “Create and upload file”.
- Now “Browse” to select the CSV file.
- Now click on “Verify”, which will confirm that the format in the CSV file is correct or not. After completion of the verification, the message of “File looks good” will appear then click on “Next”.
- Now, for these users, customize the options as per your requirement. It will be better to assign the product licenses for these users at this stage. You can opt to not assign the licenses to the users by selecting the “Create users without product license”. If you opted for this option, then you’ll have to assign the license later manually. Once done with customization, click on “Next” to create these users.
Step-4: Create Migration Endpoints with Gmail IMAP
Office 365 establishes a simplified communication channel with Gmail to complete migration, called migration endpoint. After creating users in office 365, we will create “Migration Endpoints” in 365 to connect point to Gmail and then migrate the emails from Gmail to 365.
- In the “Admin Center”, click on “Admin Centers” link at the bottom of the left pane.
- Then Click on “Exchange” which will open the Exchange Admin Center.
- Now in the left panel of windows, click on “recipients”
- Now click on the “migration” located on the top bar (the last option).
- Now click on More (the three dots …), and then click on “Migration Endpoints”.
- Now in the migration endpoints windows, click on the “+” icon to create new migration endpoints.s
- You will be given options of
- Exchange Remote
- Outlook Anywhere
- IMAP (select this)
- Now enter the following values for Gmail.
- IMAP server:
Then click on Next.
- Now the migration service will use these settings to establish a connection to Gmail. If the connection works perfectly, the ‘Enter general information page’ will open.
- In the “Enter General Information Page”, enter the name for this “Migration endpoint” for example RN-test-migration and no need to enter any values in the fields of:
- Maximum concurrent migrations
- Maximum concurrent incremental sync.
Leave these two fields empty.
Step-5: Create List of Users for Migration Batch
Before starting the migration process, you must first list down every Gmail mailbox that has to be migrated in a CSV (MS Excel) file. The list itself can be migrated in batches or all at once, but only 50,000 mailboxes can be imported in a single batch. Moreover, the CSV file size must be less than or equal to 10 MB and each user’s data must have its row.
While creating migration files, you must know the password for every Gmail ID that will be migrated. It is practically impossible to know every password, then reset the user’s password in Gmail and assign temporary passwords during the migration for every Gmail mailbox. This can only be performed by a G Suite administrator.
Do note that this CSV (MS Excel file) will be different than the one we used for creating new users in Admin Centers of Office 365. This CSV file will be used only for migrating mailboxes from Gmail to Office 365 for the users that we have already added in Office 365. The 1st line of this CSV file will be a header row with the following three column headings :
- EmailAddress: The Email ID of Office 365
- UserName: Gmail ID
- Password: Password of Gmail ID
And from the 2nd row, enter the list of mailboxes that needs to be migrated. The password field will contain a Gmail password for the corresponding mailbox that we are migrating.
- Now sign-in to the G Suite admin console and select ‘Users’.
- With G Suite console opened, sign-in to the Office 365 Admin Center.
- Select ‘Users’ and then “Active users”.
- Keep Office 365 Admin Center open and then launch Excel.
- In Excel, label
- A1 as “EmailAddress” Office 365 mailbox ID
- B1 as “UserName” Gmail mailbox ID,
- C1 as “Password” Gmail mailbox app password/the reset temporary password.
- Now, in the next rows, enter one mailbox per row in the format as discussed in the step above by using the G-Suite Admin Console and Office 365 Admin Center. Both email addresses i.e. of Office 365 and Gmail can be similar as well, but the environment (From G Suite to Office 365) will be different.
- Once all the email IDs are entered, save the file in the CSV format. This file will be used in the next step.
Step-6: Create Migration Batch to Migrate Mailboxes
It is time now to migrate a batch of Gmail mailboxes to Office 365. To ensure the process goes smoothly, first migrate a small number of mailboxes as a test batch. If everything goes fine, you will have an idea of how much time the migration process will take. You can then start the migration process all at once or in many migration batches at the same time (recommended). The factors which impact migrations are the batch size, internet bandwidth, speed, number of simultaneous connections allowed to Gmail.
- In “Exchange Admin Center” click on Recipients
- Then click the last option of top row “Migration“, click on the “+” icon and then click on “Migrate to Exchange Online”.
- Now create a new “Migration Batch”. The following 4 options will be displayed.
- Remote move migration
- Staged migration
- Cutover migration
- IMAP migration (Select This)
Now select the “IMAP Migration”.
- Now in the “Select the Users” window, click on “browse” and select the CVS file created in the last step (which has the username and password for Gmail accounts to be migrated). Then click on “Next”.
- After validation, Office 365 displays the Gmail mailboxes. Make sure that the number of users Office 365 is showing is the correct number that you want to migrate. Then Click Next.
- The IMAP migration configuration values that we already entered will be displayed. Following values will be displayed:
- IMAP server:
- Click on “Next” and enter the Migration Batch name (no spaces or special characters) and then click on “New”, which will create the migration batch. Also, provide the names of the folders to excluded (i.e. Junk Email, Deleted, etc.). Click Add (+) icon to add them to the excluded list.
- Then start migrating the emails automatically.
- Status of this migration batch will be initially shown as “Queued”, which will, later on, change to “Syncing”. And once the migration is complete, it will change to “Synced”. In the migration process, you can click on “View details” to check how many emails have been migrated so far for each mailbox.
- If an error occurs, the specific information will be under the associated Mailbox status reports
- If everything worked fine, then users should be able to log in with their username and temporary password. They should create a new password and set the correct time zone. Finally, they should send a test email to ensure that their mailbox contains the right emails and folders.
- Remember to lower the time-to-live setting in the DNS server to ensure that there are no mail delivery delays. You can do this in the email system’s mail exchanger records/MX records within the company’s public-facing DNS. It should be set at 3,600 seconds or lower. This should be reset back to a higher time when the synchronization is complete.
Step-7: Update DNS & Repoint MX Records to Office 365
Email systems deploy a DNS record (MX record) to find out the exact address for the email delivery. Still, the MX record is pointing to Gmail. Now is the point to change MX record to refer to Office 365. After you change your MX record, the email sent to your Gmail Account is delivered to Office 365 mailboxes.
The DNS records need to verify that your domain has been changed from Google to Office 365. There are many instructions to change the MX record for different DNS systems. Before you stop synchronization with Gmail, you need to wait a minimum of 72 hours as it takes that much for other email systems to recognize the MX record change. After 72 hours, you can stop synchronization with Gmail.
- In the “Admin Center”, click on “Settings”.
- Then Click on “Domains”.
- Now click on your domain name. This will say “Setup in progress”. You might also see another line here, which will say “Setup completed”. For example, if your domain name is example.com
- example.com (Default) – Setup in progress
- onmicrosoft.com – Setup completed
Now Click on the default example.com
- You will see “Setup your online services” screen with the following two options:
- Add records for me: This option will be used to connect to the DNS domain (For example, GoDaddy) & automatically update the MX records.
- I’ll manage my DNS records: This option will give you a list of DNS entries (MX record values) that you’ll need to add manually in your domain registrar account.
- Select the 2nd option, to see the MX records you would be required to add on your DNS. The following is an example of the records: MX, TXT, and CNAME. Remember that for your domain, the MX record values will be different.
- Once you update your DNS with the above values, you’ll start receiving the new emails to our Office 365.
- Before deleting the migration batch and stop syncing, make sure that all emails are being routed to Office 365. To delete the migration batch, go to the Exchange admin center and select ‘Recipients’ and then click on ‘Migration.
- Choose the batch and select ‘Delete’. You need to check that the migration batch is not displayed on the migration dashboard, which means that migration has worked.
Step-8: Import Contacts and Calendar
Once migration is completed, you can independently import your Google Contacts and Calendar to Office 365. If you have an Outlook desktop version installed, then you can create a CSV file of the Gmail contacts and then import it to the Outlook with the import/export wizard. Also, Outlook offers a wizard to import the Google calendar.
Hopefully, you have migrated from Gmail to Office 365 successfully.