Knowledge Base

Troubleshooting authentication problems when migrating from Google


You are unable to perform a migration from Gmail or Google Workspace (formerly G Suite) via the IMAP protocol. The following error message is displayed:

[AUTHENTICATIONFAILED] Invalid credentials (Failure)


Starting May 30, 2022, Google has discontinued the support for using third-party apps to access Google accounts by providing only username and password. To allow CodeTwo migration software to migrate mailboxes from Gmail / Google Workspace, enable 2-step verification for all Google accounts you intend to migrate and use app passwords instead of regular Google passwords.

Follow the steps below to be able to proceed with your migration:

  1. Log in to your Google account and go to security settings. You can use this direct link:
  2. In the Signing in to Google section, enable 2-Step Verification and select App Passwords (Fig. 1.).

Fig. 1. Google account login settings.

  1. Click Select app and choose Other (Custom name), as shown in Fig. 2.

App password setup.
Fig. 2. App password setup.

  1. Type in your custom app name (e.g. CodeTwo Office 365 Migration) and click GENERATE.

Providing the app name.
Fig. 3. Providing the app name.

  1. Your password (16-character code) appears in a new window. Copy the password so that it can be used when configuring the migration job, then select DONE.

Fig. 4. Generated app password.


The above steps need to be carried out for each migrated mailbox separately.

  1. When configuring your IMAP migration job, you need to upload a CSV file that includes information about your source mailboxes. The file needs to contain the generated app passwords instead of the standard Google account passwords, as shown in Fig. 5.

An example of a CSV file created in Excel containing the generated app password.
Fig. 5. An example of a CSV file created in Excel containing the generated app password.

Refer to the user’s manual to learn more about configuring a migration job in:

  1. Once you have completed the configuration wizard, start the migration job.

Was this information useful?