Difference between revisions of "Google Workspace Integration"

[unchecked revision][unchecked revision]
Line 31: Line 31:
* Enable the ''API access'' and save the changes.
* Enable the ''API access'' and save the changes.
* Select ''Advanced settings'' from the list of options.
* Select ''Advanced settings'' from the list of options.
* Select ''Manage third party OAuth Client access'' in the ''Authentication'' section.
* Select ''Manage API client access'' in the ''Authentication'' section.
* In the ''Client name'' field enter the service account's ''Client ID'' (e.g. ''1047453716425-4l533u425bp2m3lfp0c23ntf8mghlbmb.apps.googleusercontent.com'').
* In the ''Client name'' field enter the service account's ''Client ID'' (e.g. ''1047453716425-4l533u425bp2m3lfp0c23ntf8mghlbmb.apps.googleusercontent.com'').
* In the ''One or More API Scopes'' field enter the following scopes:
* In the ''One or More API Scopes'' field enter the following scopes:

Revision as of 12:24, 21 January 2015

In addition to adding users manually as described in chapter User Management, MailStore Server can synchronize its internal user database with the Google Apps Account of your organization.

During synchronization, user information, such as user names and email addresses, is copied from the Google Apps Account into MailStore Server's user database. That way, users can use their Google Apps Account credentials to also log on to MailStore Server and emails can be assigned to their corresponding user archives automatically, for example. No changes are made to the Google Apps Account itself by MailStore Server. The scope of the synchronization can be limited through filters.

Prepare the Google Apps account

In order to synchronize accounts information from Google Apps, MailStore Server requires a service account which has been granted permission to access the Google Apps account. This same service account is later used for archiving email from Google Apps.

Creating a Project

Before MailStore is able to connect to Google Apps accounts a project has to be created. In Google's terminology, a project is the collection of all settings, credentials and meta data of an application that uses Google Developer APIs or Google Cloud resources.

  • Go to the Google Developers Console.
  • If prompted, login using a Google Account with administrative rights.
  • Click Create project.
  • Name the project e.g. MailStore API Access.
  • Click Create.
  • In the sidebar on the left, expand APIs & auth.
  • Next, click APIs.
  • In the list of APIs, make sure Admin SDK and Gmail API show a status of ON.
  • In the sidebar on the left, select Credentials.
  • Under the OAuth heading, select Create new Client ID.
  • When prompted, select Service Account and click Create Client ID.
  • A dialog box appears. To proceed, click Okay, got it.
  • Save the P12 file (e.g. MailStore API Access-e035d2ad4f35.p12) to an appropriate folder on the MailStore Server. MailStore Server does not require the private key password (i.e. notasecret)
  • Note the Client ID and Email Address provided for later use.

Grant access to the required APIs

Once created, grant the project access to the APIs used by MailStore Server's Directory Services module.

  • Go to your Google Apps domain’s Admin console.
  • Select Security from the list of controls. If you don't see Security listed, select More controls from the gray bar at the bottom of the page, then select Security from the list of controls. If you can't see the controls, make sure you're signed in as an administrator for the domain.
  • Select API reference from the list of options.
  • Enable the API access and save the changes.
  • Select Advanced settings from the list of options.
  • Select Manage API client access in the Authentication section.
  • In the Client name field enter the service account's Client ID (e.g. 1047453716425-4l533u425bp2m3lfp0c23ntf8mghlbmb.apps.googleusercontent.com).
  • In the One or More API Scopes field enter the following scopes:
    https://mail.google.com/, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.user.readonly
  • Click Authorize.

Accessing Directoy Service Integration

  • Log on to MailStore Client as a MailStore Server administrator.
  • Click on Administrative Tools > Users and Archives > Directory Services.
  • In the Integration section, change the directory service type to Google Apps.
Gapps sync 01.png

Connection to Active Directory

For synchronization MailStore Server requires information on how to connect to the Active Directory.

  • Service Account
    The email address provided by the Google Apps Project (e.g. 104745371642[email protected]).
  • User Name
    The email address of a Google Apps Administrator (e.g. [email protected]).
  • Certificate
    To import, select the P12 file which was provided for downloading when creating the project.

User Database Synchronization

After configuring the connection settings as described above, you can specify filter criteria for the Google Apps synchronization in this section.

  • Sync only these groups
    Choose one or several Google Apps groups if you only want their members to be created as MailStore Server users. That way it's possible to exclude certain users from being synchronized to MailStore Server.


  • Automatically delete users in MailStore Server
    Here you can choose whether users that have been deleted in the Google Apps Account will also be deleted in the MailStore Server user database by the synchronization. Users will also be deleted if they fall out of scope of the configured settings.
    Only MailStore Server users that have their authentication method set to Directory Services will be deleted.
    If the archive folder of such a user already contains archived emails, only the user entry but not its archive folder will be deleted in MailStore Server.

Assigning Default Privileges

By default, users that have been synchronized to MailStore Server from Google Apps Account have the privilege to log on to MailStore Server as well as read access to their own user archive.
You can configure those default privileges before synchronization, for example, to assign the privilege Archive E-mail to all new users. To do this, click on Default Privileges...
More information on managing user privileges and their effects is available in the chapter Users, Folders and Settings which also has details on editing existing privileges.

Running Directory Services Synchronization

Click on Test Settings to check synchronization configuration and the results returned by the Google Apps Account without any changes to the MailStore Server user database being actually committed.

To finally run the synchronization, click on Synchronize now. The results are shown with any changes committed to the MailStore Server user database.

ApplicationIntegration sync 02.png

Login with Google Apps Account Credentials

After synchronization MailStore users can log on to MailStore Server with their Google Apps Account username and Google Apps Account password.