My favorites | Sign in
Google
                
Search
for
Updated Aug 18, 2009 by darrell.kuhn
SyncServiceGuide  

Google Calendar Connector Sync Service Installation and Configuration Guide 1.2.0.289

The Google Calendar Connector Sync Service provides data flow from Google Calendar. The Sync Service periodically polls Google Calendar for free/busy data and appointment data, which includes the name, place, and attendees of events.

This document provides detailed instructions for installing and configuring the Google Calendar Connector Sync Service. Contents

  1. About This Document
    1. Audience
    2. For More Information
  2. Before You Install
    1. Prerequisites
    2. Google Calendar Account Setup
    3. Exchange User Mapping
    4. Dedicated Windows Service Accounts
    5. Installation Checklist
  3. Installing the Google Calendar Connector Sync Service
    1. MSI Installation
    2. Multiple Sync Service Instances
  4. Configuring the Google Calendar Connector Sync Service
    1. Editing the Configuration File
    2. Encrypting the Configuration File
    3. HTTP Proxy Configuration Optional
  5. Installation Success
    1. Start the Google Calendar Connector Sync Service
  6. Testing and Troubleshooting
    1. Running Diagnostics Tests
    2. Logging Configuration
  7. Known Issues
  8. Copyright Notices

1 About This Document

This section describes the audience for this document, the organization of the material, and some additional sources of information.

The Google Calendar Connector Kit is a set of server-installed tools that require knowledgeable installation and configuration, tailored to the particulars of a customer's environment. These tools are only the technological part of the integration experience.

Before proceeding to install the Google Calendar Connector Sync Service, please read and understand the important Security Considerations outlined in the Overview Guide.

Audience

This document is for systems administrators tasked with setting up and managing the Google Calendar Connector Sync Service. Users of this documentation need to be familiar with Google Calendar administration, Microsoft Exchange Server and Windows network administration.

It is important to note that this tool only represents part of a solution for free/busy interoperability.

For More Information

This document is part of the Google Calendar Connector document set, which includes the following related documents:

  • Overview Guide. Describes the components, process flow, and security considerations for the connector.

For background or general information on Google Apps, see the Google Apps for Administrators Help Center.

For background or general information on Windows administration, see Microsoft TechNet.

2 Before You Install

Before you install and configure the connector, make sure your Windows environment meets the prerequisites, and that your Google Calendar and Exchange accounts are prepared for sharing data.

Prerequisites

To support the Sync Service, your Windows environment must meet these prerequisites:

Google Calendar Account Setup

Create a dedicated Google Apps Administrator account and perform an initial login. The user name and password are required later when you populate the GoogleApps.AdminUser.Login and Password parameters in the configuration process. NOTE: Before this account can be used with the Sync service you must login to Google Apps account and accept the standard terms of service agreement for the user account.

Exchange User Mapping

Each Google Calendar user must have a corresponding mail-enabled Active Directory user, contact object or mailbox-enabled user object. Whether you choose to map Google Apps users to contact objects or user objects depends upon whether you have chosen the SchedulePlus writer or AppointmentWriter respectively, for synchronizing user data.

See the Overview Guide for more information.

For instructions on how to create a mail-enabled users, see the Microsoft TechNet article, How to Create a New Mail-Enabled User.

For instructions on how to create an Active Directory contact, see the Microsoft TechNet article, How to Create a Contact in Active Directory.

Dedicated Windows Service Accounts

The Sync Service requires dedicated Active Directory role accounts for performing LDAP queries against Active Directory and performing free/busy reads and writes against Exchange.

Create these service accounts as described in this section, and reference the user names and passwords when configuring the Sync Service.

The required service accounts are itemized below:

Active Directory LDAP Query User

Create a dedicated user for performing Active Directory LDAP queries. The user name and password are required later when you populate the ActiveDirectory.DomainUser.Login and Password parameters in the Sync Service configuration file.

Exchange Query Admin User

Create a dedicated user for the Sync Service to read and write free/busy or appointments against Exchange. The user name and password are required later when you populate Exchange.GCalQueryAdmin.Login and Password parameters in the Sync Service configuration file.

The Exchange Query Admin user needs the extended "Receive As" permissions to be able to read and write both free/busy and appointments in Exchange.

To configure the permissions for the query admin user:

  1. Start Registry Editor (regedit).
  2. Navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\Exchange\ExAdmin
  3. On the Edit menu, click Add Value, and then add the following registry value:
  4. Close Registry Editor.
  5. Start the Exchange System Manager.
  6. Right Click on your Exchange Organization Name and select Properties
  7. Select the Security Tab
  8. Click the Advanced button
  9. Click Add
  10. In the Select Users, Computers, or Groups dialog enter the user name of the query admin user and click OK
  11. Check the Allow box for the permission "Receive As" and click OK

Remounting the Exchange Information Stores

The Exchange Information store caches permissions data. To flush the cache immediately after setting new permissions, dismount and remount the appropriate information store or restart the Information Store service. Otherwise the changes will not take effect until Exchange rebuilds the permissions cache.

To dismount and remount the public folder store:

  1. Open Exchange System Manager
  2. In tree view, expand Administrative Groups, {Your Administrative Group}, Servers, {Your local Exchange server}, and {Your Storage Group}.
  3. Right click on the Public Folder Store, select Dismount Store and click Yes to continue.
  4. Right click on the Public Folder Store, select Mount Store and click Yes at the success message dialog.

To restart the service Microsoft Exchange Information Store:

  1. Open the services.msc
  2. In right pane view, locate Microsoft Exchange Information Store, right click and select Restart

Installation Checklist

3 Installing the Google Calendar Connector Sync Service

Task Completed? Notes
Verify that Windows environment prerequisites are met
Create user mailboxes (Appointment writer) or contact objects (SchedulePlus writer) for Google Apps users in Exchange.
Create dedicated Google Apps Sync Service user User name and password:
Create dedicated Active Directory user User name and password:
Create dedicated Exchange Query user User name and password:
Create dedicated Exchange Admin user User name and password:
Set Exchange permissions for Query and Admin users

MSI Installation

The installer for the Sync Service is provided in the installation package file GoogleCalendarConnectorSyncService.msi.

To install the Sync Service:

  1. Locate and open the file GoogleCalendarConnectorSyncService.msi.
  2. In the welcome dialog, click Next.
  3. In the Select Installation Folder dialog, select the desired folder or accept the default value.
  4. In the Select Installation Folder dialog use the radio buttons at the bottom of the dialog to determine whether to install the service only for yourself, or for all users, and click Next.
  5. Click Next to begin the installation, and then Close when the dialog displays the message "Installation Complete".

Multiple Sync Service Instances

If you need to sync more than one domain with the Google Calendar Sync Service you can use the following instructions for setting up multiple instances of the Google Calendar Sync Service on a single server.

  1. Install the Google Calendar Sync Service
  2. Copy the default installation of the Google Calendar Sync Service to a new folder, for example "C:\Program Files\Google\Google Calendar Connector Sync Service - domain.com"
  3. Run the sc command to create a new service entry for the new path and exe
NOTE: There is a single space after binpath= and start=
 %WINDIR%\System32\sc.exe create "Google Calendar Sync Service - domain.com" binpath= "C:\Program Files\Google\Google Calendar Connector Sync Service - domain.com\GoogleCalendarSyncService.exe" start= auto
  1. Create new logging folder paths
  2.  mkdir C:\google\logs\Domain.com
     mkdir C:\google\data\Domain.com
  3. Configure new logging paths: Update the new config file for the new domain with the following in the GoogleCalendarSyncService.exe.config adding the domain.com directory to each logging path
  4.  <add key="GoogleApps.GCal.LogDirectory" value="C:\google\logs\domain.com\"/>
     <add key="SyncService.XmlStorageDirectory" value="C:\Google\data\domain.com\" />
     <file value="C:\Google\logs\domain.com\SyncService.log" />
     initializeData="c:\google\logs\domain.com\SyncNetTrace.log"
  5. Update the specific Google Apps Domain Values
  6.  <add key="GoogleApps.DomainName" value="domain.com" />
     <add key="GoogleApps.AdminUser.Login" value="user" />
     <add key="GoogleApps.AdminUser.Password" value="password" />

4 Configuring the Google Calendar Connector Sync Service

Configuration settings for the Sync Service are stored in the configuration file GoogleGCalExhangeSync.Service.exe.config. You must edit this file and enter values appropriate to your setup.

Editing the Configuration File

The configuration file GoogleGCalExhangeSync.Service.exe.config is located in the installation directory for the sync service, by default "C:\Program Files\Google\Google Calendar Connector Sync Service". The "appSettings" section of GoogleGCalExhangeSync.Service.exe.config contains configuration keys for setting up the Sync Service.

Note: If you have already set up the Google Calendar Connector Web Service in your environment, the Sync Service should use most the same settings for the following subsections of appSettings:

Configuration Key Description Default Value
ActiveDirectory.DomainController Specify the fully qualified domain name of a domain controller for your Windows Active Directory domain. This server is used for LDAP queries to retrieve user login and Exchange user attributes. For queries directly against a domain controller, prefix the machine name with LDAP://. For queries against the Global Catalog, prefix the machine name with GC://. For example: /-
<add key="ActiveDirectory.DomainController" value="HQAD1.corp.acme.com,">
</add>
`
Exchange.ServerName The full qualified domain name of the Exchange server that hosts a copy of the Public Free/Busy Information Store. For example: <add key="Exchange.ServerName" value="HQEXCH1.corp.acme.com"/>
ActiveDirectory.DomainUser.Login The userPrincipalName for the user account used by the sync service to perform Active Directory lookups. Dedicated Windows Service Accounts for more information on this user account. For example: <add key="ActiveDirectory.DomainUser.Login" value="ADDomainUser@corp.acme.com"/>
ActiveDirectory.DomainUser.Password The password for the user account used by the sync service to perform Active Directory lookups.
Exchange.ServerName The full qualified domain name of the Exchange server that hosts a copy of the Public Free/Busy Information Store. For example: <add key="Exchange.ServerName" value="HQEXCH1.corp.acme.com"/>
Exchange.GCalQueryAdmin.Login The userPrincipalName of the user account used in running diagnostic tests for the web service. This must be an Active Directory user with rights to create appointments on other users’ calendars. See Dedicated Windows Service Accounts for more information on this user account. For example: <add key="Exchange.GCalQueryAdmin" value="GCalQueryAdmin@corp.acme.com"/> This account is also used to write appointments to calendars in Exchange when using the SyncService.FreeBusy.Writer in Appointment mode.
Exchange.GCalQueryAdmin.Password The password for the user account used to create appointments.
Exchange.FreeBusyServerName This setting allows the definition of a specific Exchange server to use when reading and writing free/busy data. By default the value Exchange.ServerName is used. Use this value if the default Exchange server does not host a replica of the SchedulePlus Free/Busy Information Store. To enable this setting remove comments and define the fully qualified domain name of the server to use. For Example: <<add key="Exchange.FreeBusyServerName" value="http://HQEXCH2.corp.acme.com"/> DISABLED
GoogleApps.DomainName The domain name used by Google Apps. For example: <add key="GoogleApps.DomainName" value="acme.com" />
GoogleApps.AdminUser.Login The Google Apps user account name used for querying Google Calendar. This account must be a dedicated account in Google Apps setup for use with the Google Calendar Connector. For example: <add key="GoogleApps.AdminUser.Login" value="gcc_syncsvc"/>
GoogleApps.AdminUser.Password The password for the Google user account used for querying Google Apps and Google Calendar.
GoogleApps.GCal.EnableHttpCompression This setting determines whether or not to enable GZip compression with the GDATA API calls to Google Apps. The default setting is true for optimum performance. <add key="GoogleApps.GCal.EnableHttpCompression" value="true"/> true
GoogleApps.GCal.LogDirectory This setting defines the directory to write debug output for the GDATA API feed for each user account queried from Google Apps. An individual file is written out per user request. The output contains the calendar feed data for the specific user. If no value is defined no output is written. For Example: <add key="GoogleApps.GCal.LogDirectory" value="C:\Google\logs"/> DISABLED
GoogleApps.GCal.DomainMapping This setting allows the definition of SMTP domain name mappings. Use this setting if your Exchange Primary SMTP address is different from the Google Apps SMTP domain name. When enabled the connector will properly map the external Google Apps SMTP domain name to the internal Exchange SMTP domain name. This setting by default is commented out in the config file. To enable this setting remove comments and define the External and Internal SMTP domain names. For example: <add key="GoogleApps.GCal.DomainMapping" value="acme.com,exchange.acme.com"/> To configure multiple domain mappings use ";" as the delimiter between the domain mapping values. For Example: <add key="GoogleApps.GCal.DomainMapping value="acme.com,exchange.acme.com;company.com,exchange.company.com"/> DISABLED
Exchange.DefaultDomain This setting prevents Exchange WebDav redirects to servers outside of the DNS domain defined. Enable this feature if the connector should not redirect Exchange server outside of this DNS domain. For example: <add key="Exchange.DefaultDomain" value=".corp.acme.com"/> DISABLED
SyncService.ErrorCountThreshold This setting specifies how many errors the service allows before aborting the current synchronization run. If the value is reached during a synchronization run it halts. Once the SyncService.RefreshTimeInMinutes has expired the counter is reset to 0 and a synchronization starts again. <add key="SyncService.ErrorCountThreshold" value="20"/> 20
SyncService.LDAPUserFilter This setting allows the option to define an LDAP filer which determines which users or contacts are included in the synchronizing of data from Google Calendar to Exchange. For example to include all members of an Active Directory Group: <add key="SyncService.LDAPUserFilter" value="(memberof=CN=GCAL_Users,CN=Users,DC=corp,DC=acme,DC=com)"/> NOTE: If left blank, all users in Active Directory are included in the sync process.
SyncService.RefreshTimeInMinutes This setting specifies the interval in minutes to sleep between each completed synchronization before starting again. <add key="SyncService.RefreshTimeInMinutes" value="15"/> 15
SyncService.ThreadCount This setting specifies the number of threads to create when performing a synchronization from Google Calendar in to Exchange. The more threads the fast the sync will complete. NOTE: The more threads the more system and network resources the sync service will utilize. <add key="SyncService.ThreadCount" value="10"/> 1
SyncService.XmlStorageDirectory This setting specifies where the service stores data cached as XML documents. NOTE: The service needs write access to this directory. <add key="SyncService.XmlStorageDirectory" value="C:\Google\data"/> C:\Google\data\
SyncService.FreeBusy.Writer This setting determines the write mode for how free/busy information is populated in Exchange. Valid values are SchedulePlus or Appointment. The Appointment option is experimental as it supports a very limited set of functionality. The Appointment writer is a one-way sync of free/busy data into Exchange mailboxes that creates empty meeting placeholders based on free/busy data from Google Calendar. It is NOT designed to perform full appointment/data synchronization. For Example: <add key="SyncService.FreeBusy.Writer" value="SchedulePlus"/> If set to SchedulePlus the service will only write free/busy data to the SchedulePlus Free/Busy Information Store. This mode only works for contact or mail enabled objects that do not have Exchange an mailbox. If set to Appointment the service will create a calendar placeholder appointment for each Google Calendar event in the calendar of the user's Exchange mailbox. This mode only works if the user has a Exchange mailbox. NOTE: The service can only be configured in a single mode. If you wish to run the sync for both contacts and mailbox enabled users you will need to install the sync service on two separate servers. SchedulePlus
Configuration.EncryptOnNextRun If set to “true”, the configuration file is automatically encrypted the next time the application runs. See Encrypting the Configuration File for more information. false
SyncService.FreeBusy.DetailLevel If set to "Full", enables distinguishing between tentative and busy in the Free/Busy lookups. Setting it to "Basic" treats both tentative and busy as busy. Full
SyncService.PlaceHolderMessage This setting allows for customization of the subject text placed in each calendar placeholder appointment when running the Sync service SyncService.FreeBusy.Writer in Appointment mode. For example: <add key="SyncService.PlaceHolderMessage" value="GCal Free/Busy Placeholder"/> NOTE: This property only applies to only new placeholder appointments being created. It will no go back and rewrite existing placeholder values. GCal Free/Busy Placeholder
SyncService.SyncAppointmentDetails Experimental Feature: This setting configures the Appointment writer to include appointment details (i.e. subject, location, description) information when creating Placeholder appointments on Exchange Calendars. This feature only writes the appointment details when it creates the initial placeholder appointment on the Exchange calendar. This means if the appointment placeholder already exists in Exchange no details will be written or updated. If however, there is no placeholder in Exchange or if the meeting time changes a new Placeholder is written and the current meeting details will be written at that time. For Example: <add key="SyncService.SyncAppointmentDetails" value="false" /> The subject of each appointment will be included the SyncService.PlaceHolderMessage followed by a ":" and then the title of the meeting request. For example: "GCal Free/Busy Placeholder: Sample Calendar Appointment Subject" NOTE: This setting depends on <add key="SyncService.FreeBusy.Writer" value="Appointment"/> being set to Appointment and <add key="SyncService.FreeBusy.DetailLevel" value="Full" /> being set to Full. false
SyncService.FreeBusy.DetailLevel This setting defines the gdata feed type to use when retrieving free/busy data from Google Apps. The setting has two values Basic or Full. The basic feed only contains free and busy blocks. This means a meeting in GCal marked as "Maybe" will display as "Busy" when viewing the free/busy data. The full feed contains much more detail and includes the user's meeting response. Using this feed provides more verbose detail and reflects the free/busy status more accurately. If the value is set to full a meeting in GCal marked as "Maybe" will be displayed as "Tentative when viewing the free/busy data. For Example: <add key="SyncService.FreeBusy.DetailLevel" value="Full" /> Full

To edit the configuration file:

  1. Using your preferred XML or text editor, open GoogleGCalExhangeSync.Service.exe.config. The default location is C:\Program Files\Google\Google Calendar Connector Sync Service\.
  2. Scroll to the appSettings section and enter appropriate values for each of the required values shown in the table above. For example, if you are using the SchedulePlus writer option instead of the Appointment writer, specify it in the SyncService.FreeBusy.Writer key: <add key="SyncService.FreeBusy.Writer" value="SchedulePlus"/>
  3. Save the file.
  4. Save or copy a backup copy of the file to a secure location.

Encrypting the Configuration File

Because some configuration keys contain user names and passwords in plain text, it is recommended that you encrypt these configuration parameters. To enable encryption, set the value of the Config.EncryptOnNextRun key to true. The next time the sync service starts, the appSettings keys will be automatically encrypted. This encryption method will encrypt the entire appSettings node of the configuration file, rendering it unreadable. Once encrypted, the settings are no longer in plain text on the file system. However, settings can still be changed through the IIS Manager.

HTTP Proxy Configuration Optional

The Sync Service can optionally be configured to work with an HTTP proxy. This configuration may be required if all out-bound communication is routed through a proxy. Configuring the HTTP proxy parameters in GoogleGCalExhangeSync.Service.exe.config would instruct the Sync Service to properly forward its communication through such a proxy.

Microsoft Support includes an overview of the same process and configuration in the following Knowledge Base article: http://support.microsoft.com/kb/307220.

The table below outlines the configuration parameters located under the <system.net.defaultProxy> node of GoogleGCalExhangeSync.Service.exe.config:

Configuration Key Description Default Value
bypasslist.address Allows the Sync Service to bypass the proxy for additional, non-local addresses. As per Microsoft's instructions, this field can contain a host name, or a regular expression.
proxy.usesystemdefault Instructs the .NET client to either use the default system profile for access, or to use a custom proxy defined in proxy.proxyaddress. |To override the system default and configure a custom web proxy for the Sync Service, this variable should be FALSE True
proxy.proxyaddress The URL:PORT pair for your proxy server. For example: http://proxyserver.internal.yourdomain.com:3128
proxy.bypassonlocal Allows the Sync Service to bypass the proxy for local addresses containing a ".". True

Important Note: Please carefully consider whether your Microsoft Exchange server communication should be sent through a custom proxy. Including Microsoft Exchange servers in a custom proxy scheme could result in decreased performance and certain types of Windows authentication may fail.

5 Installation Success

Start the Google Calendar Connector Sync Service

  1. Open the Windows Services Management console.
  2. Select the "Google Calendar Sync Service" and right-click for properties.
  3. Click "Start" if the service is not already started.
  4. Browse to log file path as defined by GoogleApps.GCal.LogDirectory (i.e. C:\google\logs)
  5. Review the log file SyncService.log and verify success messages

6 Testing and Troubleshooting

The Sync Service logs debugging information to a text log file, which is configurable through the log4net.config node in GoogleGCalExhangeSync.Service.exe.config. For more information, see Logging Configuration.

Monitoring the debug output in the log files is the best way to troubleshoot issues with the sync service. It is recommended to use the freeware log file utility Baretail to monitor the file in real time.

Important Note: Please review Logging Configuration before beginning to test any of the functionality of the service.

Running Diagnostics Tests

The Google Calendar Connector Web Service contains a diagnostics page that can help diagnose issues. Diagnostics.aspx, located in the root of the Web Service virtual directory, contains the following diagnostic tests relevant to the Sync Service:

This test attempts to retrieve free/busy information for a specific Google Calendar user. If the Sync Service and Google Apps are configured correctly, free/busy data should be returned.
The Sync Service can be configured to store Google free/busy data in Exchange using an appointment writer. The appointment writer creates new events on a particular user's calendar and lets Exchange handle the generation of free/busy messages. This test attempts to create such an appointment for the specified user.
The Sync Service is by default configured to write free/busy data directly into the Exchange public free/busy store. This test attempts to perform a free/busy write to the Exchange public store for the specified user.

To run diagnostic tests:

  1. Use a web browser to navigate to /Diagnostics.aspx in the root folder of the Web Service's virtual directory.
  2. Select a test and enter any optional details in its text area.
  3. Click "Verify" to run the diagnostic and view its results.

Logging Configuration

The Google Calendar Connector Sync Service includes a configuration node named

<log4net>
in GoogleGCalExchangeSync.Service.exe.config which controls the logging behavior of the Sync Service.

To use logging to troubleshoot Sync Service issues:

  • Verify an appropriate log path
  • Increase the logging level for more information
  • Verify log file system permissions if the file is not created.

Verify Log Path

To change where the log file is stored, edit the node path configuration/log4net/appender/file and change the value attribute of the file node to the new location. Include the file name in the value attribute. NOTE: The SYSTEM account needs "Modify" access to the file system path.

Increase the logging level

There are four logging levels, with DEBUG providing the most output and ERROR only logging severe events:

The Sync Service has many potential logging points for the DEBUG and ERROR levels. When logging is set to these levels, the size of the log file may grow very rapidly.

To set the Sync Service logging to a certain level, edit the node path configuration/log4net/root/level and change the value attribute to one of the four levels listed. Lower severity levels are inclusive of higher levels. For example if the Sync Service is set to INFO, it also logs WARN and ERROR but not DEBUG messages.

Verify log file permissions

Verify that the following log file permissions have been set up properly:

In GoogleGCalExchangeSync.Service.exe.config\appSettings\:

In GoogleGCalExchangeSync.Service.exe.config\configuration\log4net\appender\:

To grant "Modify" access to a directory do the following:

  1. Open Windows Explorer.
  2. Navigate to the directory root folder (i.e. C:\Google\Data).
  3. Right click on the folder and select Properties.
  4. Select the Security tab and click Add, type SYSTEM and click OK.
  5. With the SYSTEM user highlighted, check Allow for Modify privileges.

7 Known Issues

8 Copyright Notices

Library and license attributions are provided to conform with the Apache License, Version 2.0. A copy of the Apache License, Version 2.0 can be found here. The following licenses and libraries are used in the Google Calendar Connector Sync Service:

Google Data (GData) API .NET Client Library and its dependencies licensed under the Apache License, Version 2.0. (project, license) Apache log4net licensed under the Apache License, Version 2.0. (project, license) tz4net v3.0.2.0 licensed under the GNU LGPL V2. (project, license)

Portions Copyright (c) 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright (c) 2000-2002 Philip A. Craig


Google, Google Calendar, Google Calendar Connector, Google Calendar Connector Web Service, Google Calendar Connector Sync Service are trademarks of Google, Inc. All other company and product names may be trademarks of the respective companies with which they are associated.


Comment by David.Suneson, Jul 14, 2009

This says it requires Exchange 2003, will this work with Exchange 2007?


Sign in to add a comment