# Google Apps Connector



# Google Apps Connector

## Introduction

### Description

Google Apps Connector allows you to manage users and groups using the Google Directory API.

### Managed System

This connector is specific for integration with the Google domain.

<p class="callout info">For more information to check if your system may be synchronized with this connector do not hesitate to contact us through our [Contact form](http://www.soffid.com/contactform/)</p>

### Prerequisites

To get a service account and a private key, please follow this link: [Creating a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount). You must:

- Register a new project
- Enable AdminSDK API
- Register a new OAuth service account. Store the JSON generated file in a secure place.

Furthermore, you will need to follow [this guide](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to enable the recently created account to use directory API services. The scopes to grant are:

- <span class="nowrap">View and manage the provisioning of groups on your domain: <span class="u"><span class="nolink">[https://www.googleapis.com/auth/admin.directory.group](https://www.googleapis.com/auth/admin.directory.group)</span></span></span> <span class="nowrap"> </span>
- <span class="nowrap">View and manage group subscriptions on your domain: <span class="u"><span class="nolink">[https://www.googleapis.com/auth/admin.directory.group.member](https://www.googleapis.com/auth/admin.directory.group.member)</span></span></span>
- <span class="nowrap">View and manage organization units on your domain: <span class="u"><span class="nolink">[https://www.googleapis.com/auth/admin.directory.orgunit](https://www.googleapis.com/auth/admin.directory.orgunit)</span></span></span> <span class="nowrap"> </span>
- <span class="nowrap">View and manage the provisioning of users on your domain: <span class="u"><span class="nolink">[https://www.googleapis.com/auth/admin.directory.user](https://www.googleapis.com/auth/admin.directory.user)</span></span></span>

## Download and Install

This addon is located in the Connectors section and its name is **Google Apps plugin**.

<p class="callout info">For more information about the installation process you can visit the [Addons Getting started](https://bookstack.soffid.com/books/addons-getting-started/page/getting-started "Addons installation") page.</p>

## Agent Configuration

### Basic

#### Generic parameters

After the installation of the addon, you may create and configure agent instances.

To configure this Google Apps Connector you must select "GoogleApps" in the attribute "Type" of the generic parameters section in the agents page configuration.

<p class="callout info">For more information about how you may configure the generic parameters of the agent, see the following link: [Agents configuration](https://bookstack.soffid.com/books/soffid-3-reference-guide/page/agents "Agents")</p>

#### Custom parameters

Below there are the specific parameters for this agent implementation:

<table class="confluenceTable tablesorter tablesorter-default stickyTableHeaders" id="bkmrk-parameter-descriptio" role="grid"><thead class="tableFloatingHeaderOriginal"><tr class="tablesorter-headerRow" role="row"><th aria-disabled="false" aria-label="Parameter: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="0" role="columnheader" scope="col" style="width: 209px;" tabindex="0"><div>**Parameter**</div></th><th aria-disabled="false" aria-label="Description: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="1" role="columnheader" scope="col" style="width: 600px;" tabindex="0"><div>**Description**</div></th></tr></thead><tbody aria-live="polite" aria-relevant="all"><tr role="row"><td class="confluenceTd" colspan="1" style="width: 209px;"><span class="etiqueta">Admin user</span>

</td><td class="confluenceTd" colspan="1" style="width: 600px;">Administrator account name

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 209px;"><span class="etiqueta">Service account client email</span>

</td><td class="confluenceTd" colspan="1" style="width: 600px;">Extract it from generated json file. It is tagged as client\_email

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 209px;"><span class="etiqueta">Service account private key</span>

</td><td class="confluenceTd" colspan="1" style="width: 600px;">Extract it from generated json file. It is tagged as private\_key. As the private key is JSON encoded, mind to replace unicode escape chars by it's ASCII equivalents

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 209px;"><span class="etiqueta">Google domain</span>

</td><td class="confluenceTd" colspan="1" style="width: 600px;">Base google domain

</td></tr></tbody></table>

### Attribute mapping

This connector could manage users and groups.

#### Properties

<span style="background-color: #ffffff;">Nothing to configure.</span>

#### Attributes

##### Users

Users and shared accounts can be customized. The next attributes are required:

<div id="bkmrk-attribute-value-susp"><table class="confluenceTable tablesorter tablesorter-default stickyTableHeaders" role="grid"><thead class="tableFloatingHeaderOriginal"><tr class="tablesorter-headerRow" role="row"><th aria-disabled="false" aria-label="Attribute: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="0" role="columnheader" scope="col" style="width: 150px;" tabindex="0"><div><div>**Attribute**</div></div></th><th aria-disabled="false" aria-label="Value: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="1" role="columnheader" scope="col" style="width: 669px;" tabindex="0"><div><div>**Value**</div></div></th></tr></thead><tbody aria-live="polite" aria-relevant="all"><tr role="row"><td class="confluenceTd" style="width: 150px;">suspended

</td><td class="confluenceTd" style="width: 669px;">"True" if the account is disabled. "False" otherwise

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 150px;">name{"givenName"}

</td><td class="confluenceTd" colspan="1" style="width: 669px;">User given name

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 150px;">name{"familyName"}

</td><td class="confluenceTd" colspan="1" style="width: 669px;">User last name

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 150px;">name{"fullName"}

</td><td class="confluenceTd" colspan="1" style="width: 669px;">User full name

</td></tr><tr role="row"><td class="confluenceTd" colspan="1" style="width: 150px;">primaryEmail

</td><td class="confluenceTd" colspan="1" style="width: 669px;">Account name

</td></tr></tbody></table>

</div>To get an extensive list of attributes supported by Google, browse to [Google User API](https://developers.google.com/admin-sdk/directory/v1/reference/users)

Soffid groups can be mapped as OrgUnits.

<div id="bkmrk-attribute-value-name"><table class="confluenceTable tablesorter tablesorter-default stickyTableHeaders" role="grid"><thead class="tableFloatingHeaderOriginal"><tr class="tablesorter-headerRow" role="row"><th aria-disabled="false" aria-label="Attribute: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="0" role="columnheader" scope="col" style="width: 117px;" tabindex="0"><div><div>**Attribute**</div></div></th><th aria-disabled="false" aria-label="Value: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="1" role="columnheader" scope="col" style="width: 206px;" tabindex="0"><div><div>**Value**</div></div></th></tr></thead><tbody aria-live="polite" aria-relevant="all"><tr role="row"><td class="confluenceTd" style="width: 117px;">name

</td><td class="confluenceTd" style="width: 206px;">Org Unit Name

</td></tr></tbody></table>

</div>##### Groups

Mails alias will be automatically bound to users without any further configuration.

Roles and Mail Lists will also be created and maintained as Google Apps groups.

<p class="callout info">For more information about how you may configure attribute mapping, see the following link: [Soffid Attribute Mapping Reference](https://bookstack.soffid.com/link/72#bkmrk-soffid-attributes)</p>

For instance:

[![image-1641828269243.png](https://bookstack.soffid.com/uploads/images/gallery/2022-01/scaled-1680-/image-1641828269243.png)](https://bookstack.soffid.com/uploads/images/gallery/2022-01/image-1641828269243.png)

#### Triggers

Nothing to configure. This option is not available to Google apps connector.

### Load Triggers

You can define BeanShell scripts that will be triggered when data is loaded into Soffid (incoming triggers). The trigger result will be a boolean value, true to continue or false to stop.

Triggers can be used to validate or perform a specific action just before performing an operation or just after performing an operation into Soffid objects.

<p class="callout info">To view some examples, visit the [Incoming triggers examples page.](https://bookstack.soffid.com/books/connectors/page/incoming-triggers-examples "Incoming triggers examples")</p>

### Account metadata

Agents allow you to create additional data, on the "Account metadata" tab, to customize the accounts created for that agent. This additional information will be loaded with the agent's information, or calculated as defined in the mappings.  
The additional data can be used in both mappings and triggers.

The attributes which you define here will be shown when you click on the proper account, on the Accounts Tabs at user page.

## Operational

### Monitoring

After the agent configuration you could check in the monitoring page if the service is running in the Synchronization Server, please go to:

- <span style="background-color: #d3efff; color: #01466c;">Start Menu &gt; Administration &gt; Monitoring and reporting &gt; Syscserver monitoring</span>

### Tasks

#### Authoritative

If you are checked "Authorized identity source", an automatic task to load identities from the managed system to Soffid is available, please go to:

- Start Menu &gt; Administration &gt; Monitoring and reporting &gt; Scheduled tasks

And you will something like "Import authoritative data from &lt;AGENT\_NAME&gt;".

#### Reconcile

If you are configured the "Attribute Mapping" tab with some of our objects: "user or group", an automatic task to synchronize these objects from the managed system to Soffid is available, please go to:

- Start Menu &gt; Administration &gt; Monitoring and reporting &gt; Scheduled tasks

And you will do something like "Reconcile all accounts from &lt;AGENT\_NAME&gt;".

### Synchronization

Regarding the synchronization of the objects, there are two possible options:

- If you are checked the generic attribute "Read Only" in the "Basics" tab, only the changes in the managed systems will be updated in Soffid. We recommend these options until the global configuration of Soffid will be tested.
- If you are not checked the generic attribute "Read Only" in the "Basics" tab, all the changes in Soffid or the managed system will be updated in the other. Note that this synchronization must be configured in the "Attribute mapping" tab correctly.

<p class="callout info">For more information about how you may configure the generic parameters of the agent, see the following link: [Agents configuration](https://bookstack.soffid.com/books/soffid-3-reference-guide/page/agents "Agents")</p>