Migration of the mailboxes from G-mail to O365 does need a few pre-requisites like,
- Enabling IMAP protocol.
- Selecting out the labels that need to be visible for the IMAP migration.
- Allowing Less Secure App Access to establish a vulnerable connection between O365 and G-mail.
Enabling IMAP protocol
- For enabling the IMAP, follow the steps,
Open G-mail > settings > Forwarding and POP/IMAP > Enable IMAP in IMAP access tab.
Labels
- Selection of labels enables the third party tools to both differentiate between the items that have migrated and also detect the items in the mailbox.
Show or hidethe desired items that are involved in the process of migration.- Removing a label will not remove the messages with that label.
Less Secure App Access
TURNING ONthe less secure app access will make the account vulnerable which in-turn makes the third party tools to access the account. (what precisely is required)Open G-mail > Manage your google account > Security > Turn on Less secure app access.
Migration process
Dive to the O365 portal with the login credentials of the Exchange administrator.
Admin > Show all > Exchange > recipients > migration > more > migration endpoints.Add a new migration end point > IMAP > (imap.gmail.com) imap server name > next > (imap.gmail.com) imap end point name > (20) maximum concurrent migrations > (10) maximum concurrent incremental syncs > new

- Divert back to recipients > migration > migration to exchange online (plus sign) > IMAP migration > Choose the CSV file with the following format as shown > follow the onscreen commands to successfully start the migration process.
- A good amount of time is taken by the O365 individually to complete the migration process depending on the size of the mailbox that need to be migrated.

| Email address | Username | Password |
| Target email address | Source email address (Gmail) | Source mail address password (Gmail) |