Migrating Contacts from Google Mail to MS Exchange Server

Migrating Contacts from Google Mail to MS Exchange Server
 
In order to migrate Gmail Email data and Contacts to an Exchange Server using Mail Data Migrator tool, there are some prerequisites that must be followed. They are as under :

  • Gmail App Registration
  • Configuring Gmail Source Server in Mail Data Migrator

Gmail App Registration : This process consists of the following steps :
  1. Prior to following the points make sure that your Google Mail account is configured to allow less secure apps. You may enable less secure app option by navigating to the URL : https://myaccount.google.com/lesssecureapps
  2. Open this URL : https://console.developers.google.com using Gmail credentials.
  3. Create New Project by clicking on Create project.


5. Once the project is created, click on Enable APIs And Services.


6. Search for Contacts API.

7. Enable Contacts API by clicking on Enable button.
 


8.  After enabling API, create credentials for API by clicking on Create Credentials button. 



9. Setup OAuth credentials for your app by specifying the values as shown below under Add Credentials to your project heading.
 


10. Choose Contacts API and then click on What Credentials do I need ? This will redirect to OAuth consent screen.
 

 11. On OAuth consent screen, select External and then click on Create button.


 
12. Give application name. Leave rest of the fields and save.
 

 

13. Create credentials for the OAuth 2 App by clicking on Credentials >> Create Credentials >> OAuth client ID.


14. Create OAuth 2 client ID by selecting Application type as Web application and by clicking on Create button after specifying the application name. Insert the base URL where your Mail Data Migrator application will run. Specify redirect URL where the user will be redirected after being granted OAuth permissions. (Note: This URL http://localhost:1122 is of Mail Data Migrator web application and can be changed if you are running Mail Data Migrator with different IIS Bindings ).


Important Note: Here in the “Redirect Uri” the path "/Home/AccessToken" should follow the domain as it is e.g. http://localhost:1122/Home/AccessToken

15. Now OAuth Client will setup after clicking Create button in above screenshot and the application will be registered successfully.


16. In this step, edit this newly registered app and copy the values of Client id and Client secret key as shown in below screenshot by editing the application.


 

Configurations required in Mail Data Migrator Application

The steps given below are required for configuring Gmail Domain emails to migrate to another target server.

1. Now Copy Client ID and Client Secret from previous step and specify these new values in Mail Data Migrator tool. See below screenshot for further clarity :



 






 2. Open Mail Data Migrator web application and then Click on Add Project and create a migration project in Mail Data Migrator tool for Gmail Migration.
 

  1. Now provide configurations of Source Google Mail Server and Target Mail Server as shown below. In given below example Google Mail is Source server whereas Microsoft Live.com is the Target Server.

3. Once both Source Google Mail and Target Mail Server connections are verified, add mailbox by clicking on Add >> Add Mailbox link. Provide Google Mail ID of your mailbox, and then click on Save button (Note: Do not provide any password for this mailbox rather keep it blank)

4. Once you click on save button below screen will appear and you will be sent an email on your google mail account to verify your account.


             
 
  1.  Email notification is sent on source Mailbox as shown below.

  1. Now user will sign into Mail Data Migrator panel by following email notification.
 
 

  1. If source mailbox is Gmail then Mail Data Migrator will redirect the user to service verification screen, asking user for permission.


  2. Hitting the verify button redirects the user to a Google screen so that it may verify its account by logging in with correct credentials.


  1. Registered application is not verified by google, it should be sent to google for verification. Therefore, click on Go to (Unsafe) option.
 

 
  1. Allow “Mail Data Migrator” as you are redirected to google consent page for allowing permissions to it.



  1. If all services are verified, user will be redirected to Add Target Mailbox screen, otherwise it will be redirected to Service Verification Screen for verification of remaining services.
 

  1. Access Token is stored in Mail Data Migrator Database, and it is refreshed automatically with a new auto-generated access token in case the previous token has expired.