This will be a short one to share my experience of doing some email data migration from one Google workspace to another workspace account.

The data migration setup is pretty straightforward and easy to use. But I encountered this issue –(Retrying) The connection to Gmail via IMAP failed. Please log in via your web browser. (18015) Furthermore, could not find any solutions on the Internet. Hence, I seek Google support help to assist me.

Hope this article will be able to help if you encounter the same error as mine.


Where To Find Data Migration?

Firstly, I will briefly start off with where can you find the Data Migration option in the Google Workspace Admin Console

1. After you have logged in to the Google Workspace Admin Console, go to Accounts -> Data Migration

DAta Migration in Google workspace admin console
Data Migration in Google workspace admin console

The entire setup is pretty simple & straightforward with various options which allow you to migrate from various emails (Gmail, google workspace, exchange, etc).

You can easily find info online and here is the video in case you would like to find out more about data migration:


How To Resolve This Error Code 18015 – (Retrying) The connection to Gmail via IMAP failed. Please log in via your web browser.

In order to resolve this error 18015 – (Retrying) The connection to Gmail via IMAP failed. Please log in via your web browser

Ensure Your IMAP is enabled for your source email account

To check whether your IMAP is enabled, you can go to the settings icon located at the top

setting icon in your google email account
setting icon in your google email account

Go to Forwarding and POP/IMAP and under IMAP access, ensure the Enable IMP is checked.

Once done, scroll down and click on the Save Changes button located at the bottom.


Ensure Less Secure Apps Access is ON

If you still encounter the same error by enabling the IMAP, you may want to see if the less secure apps option is on. There are 2 ways to check this:

  1. Through individual Google Workspace email account
  2. Using Admin Console if you are administrator rights

I shall show you how to check through individual Google Workspace email account:

Firstly, click on your profile icon located at the top right corner, then select Manage Your Google Account

Manage Your Google Account

Go to Security

Enable less secure app

Scroll down and you shall see the Less secure app access panel, click Turn on Access.
Do note that if you don’t see this setting, your administrator might have turned off less secure app account access.

Alternatively, you also can do it via Google Admin Console – https://knowledge.workspace.google.com/kb/how-to-enable-less-secure-application-access-000006971


Login Challenge – Turn off for 10 minutes

In fact, in my case these 2 options do not work, I still encounter the same error while doing data migration. Therefore I logged a case with Google and this is the workaround that they provided me :

  • Go to the source user email in the Admin Console by typing in their email address in the search bar of the Admin Console where it says – “Search for users, groups or settings”.
  • Click on the user in the search results, and within the user on the right-hand side, go to Security > Login Challenge.
  • Click on Login challenge and then click on Turn off for 10 minutes

Go back to the Data Migration and resume the migration by clicking on the checkbox against the Migration > Resume user migration.

This is the outcome after turning off for 10 minutes for the login challenge option

data migration successfully completed

Wrapping Up

In conclusion, email data migration from one Google workspace to another workspace account is a straightforward process.

If you encounter a similar issue, you can try all these methods that I have listed Alternatively, you can seek help from the Google support service if you don’t know what to do.

I hope this article will help you if you ever encounter the same error as mine.