Back to Blog Index

How to set up Dynamics 365 and Gmail integration: Yes, you can!

By Skylar Shonblom, CRM Consultant 

Given the obvious email integration capabilities between Dynamics 365 and the rest of the Microsoft stack, when rolling out an implementation many organizations opt to switch to Exchange Online-- but what if your organization uses Gmail?  Fear not, Microsoft is Google-friendly here! 

Configuring Gmail for the Integration

Firstly, we will have to look at taking a look at our settings in Gmail to permit external access to the mailbox using POP3 protocol.

  1. From, navigate to Settings > Forwarding and POP/IMAP
  2. Select Enable POP for mail that arrives from now on and When messages are accessed with POP archive Gmail's copy.
  3. Click on Save Changes.

Gmail will at times block connections from third party apps.  While Dynamics 365 uses built-in security features to keep data safe, it is not exempt from Google's own built-in security features.  To enable this connection:

  1. Go to
  2. Toggle Allow less secure apps: ON

You can read more about Dynamics 365 security here

Creating a Gmail Email Server Profile

We must next configure the Email Server Profile in Dynamics 365 to connect to Gmail.  Dynamics 365 will want to use Exchange Online by default, so we must create an entirely new profile so the mailboxes can connect to Google's servers.

  1. Navigate to your Dynamics 365 instance using your custom URL.
  2. Go to Settings > Email Configuration > Email Server Profiles
  3. Click on + New > POP3/SMTP Server
  4. Type in a name, such as "Gmail"
  5. Input the following values:
    1. Incoming Server Location:
    2. Outgoing Server Location:
      1. If a personal account, enter
      2. If you are using Gmail with a work account, enter mail.[yourdomain].com
    3. Authenticate Using Credentials Specified by a User or Queue
    4. Use same settings for Outgoing Yes
  6. Expand the Advanced tab and enter the following values:
    1. Incoming Port: 995
    2. Outgoing Port:
      1. If a personal account, enter 465
      2. If you are using Gmail with a work account, enter 110
  7. Click Save and Close.




Enabling Server-Side Synchronization

Server-side synchronization is the mechanism that provides the integration between Dynamics 365 and an email server.  This is Microsoft's preferred method of synchronization, with the other two options (Outlook and the Email Router) being gradually phased out.  To ensure that this is enabled:

  1. Navigate to Settings > Email Configuration > Email Configuration Settings
  2. Verify that Process Email Using is set to Server-Side Synchronization
  3. Verify that the Server Profile is populated with the Gmail Server Profile you just created.  If not, change it as such.




Setting-up Mailboxes

Our final steps will be to approve our mailboxes to use the Email Server Profile we created to communicate with Google's servers. 

  1. Go to Settings > Email Configuration > Mailboxes
  2. Double-click on the mailbox you would like to configure.
  3. Modify the following values:
    1. Allow to Use Credentials for Email Processing: Yes
    2. Enter the Gmail account credentials
    3. Server Profile: <Name of the Gmail server profile>
    4. Incoming Email: Server-Side Synchronization or Email Router
    5. Outgoing Email: Server-Side Synchronization or Email Router
  4. Click on Save.
  5. Click on Approve Email (note that this will only work if you are an Office 365 Global Admin)
  6. Click on Test and Enable Mailbox
  7. When you are prompted to "Sync items with Exchange from this Dynamics 365 Organization only," leave the box unchecked and hit Ok.




Wait up to a minute and refresh the page.  Configuration test Results should all show as Success!


Further reading: