Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinetrue
stylenone
Overview

...

  • Authentication
  • Create
  • Delete
  • Get
  • Schema
  • ScriptOnConnector
  • Search
  • Sync
  • Test
  • Update
  • Validate

Configuration

...

Configuration Property
Required
Type
Default Value
Description
domainXString 
Internet domain name. See https://support.google.com/a/answer/177483?hl=en
clientIdXString 
Client identifier issued to the client during the registration process.
clientSecretXGuardedString 
Client secret issued to the client during the registration process.
refreshTokenXGuardedString 
The refresh token allows you to get a new access token that is good for another hour. Refresh tokens never expire, they can only be revoked by the user or programatically by your app.
Search Projection
StringbasicWhat subset of fields to fetch for this user. Acceptable values are: basic (Do not include any custom fields for the user. Set as default), custom (Include custom fields from schemas requested in customFieldMask), full (Include all fields associated with this user).
Custom Schemas configuration
String

JSON representation of a Resource Schema where you can specify your custom schemas (in order to see them during search you must set projection to value "full").
Example: 

Code Block
[
   {
      "name":"customSchemaName",
      "multiValued":false,
      "type":"object",
      "innerSchemas":[
         {
            "name":"customFieldName",
            "multiValued":false,
            "type":"boolean",
            "innerSchemas":[
               
            ]
         }
      ]
   }
]


Obtaining the configuration parameter values

  1. Log in to your Google Apps Admin Console (at https://wwwconsole.cloud.google.com/aapis/domain-name) and verify that Security > Enable API access is checkedcredentials) and create new project.
  2. In the ID client OAuth 2.0 section if needed configure OAUTH consent section then create credentials for Desktop application and finally download the related client_secrets.json file.

  3. From the leftmost menu "API and enabled  services" enable the "Admin SDK API".
    For more information on these APIs, navigate to the Google Developers interface, and search for these APIs.
  4. In the OAuth 2.0 application of choice (at https://console.developers.google.com), create credential of type OAuth Client Id / Other, then download the related client_secrets.json file.

  5. Download the Google Apps connector bundle

  6. Change to the directory where you have downloaded the bundle and run the following command on the client_secrets.json file that you obtained earlier in this procedure:

    Code Block
    $ jar xvf net.tirasa.connid.bundles.googleapps-1.4.03.jar
    $ java -jar net.tirasa.connid.bundles.googleapps-1.4.03-credentials-generator.jar /path/to/client_secrets.json
    PleaseRequest openUrl the following address in your browser:
    is https://accounts.google.com/o/oauth2/auth?
    access_type=offlineclient_id=xxxxx&redirect_uri=http://localhost:8080/code-processor&response_type=code&scope=https://www.googleapis.com/auth/admin.directory.group%20https://www.googleapis.com/auth/admin.directory.orgunit%20https://www.googleapis.com/auth/admin.directory.user%20https://www.googleapis.com/auth/apps.licensing&state=/profile
    Opening browser in the current session.
    ...

    This command opens the default browser (if not please use the link just after the log "Request url is"), and loads a screen on which you authorize consent to access the Google Apps account.

    Info
    titleTip

    If you have recently created your Google Apps account, it might take some time (often two hours or more) to synchronize the data required for this access request to work. For additional information, refer to the Google documentation noted earlier.

     

  7. When you have authorized consent, the browser returns a code. Copy and paste the code into the terminal from which you ran the original command.

    Code Block
    $ Attempting to open that address in the default browser now...
    Please enter code:
    XXXXXXXX

    A , that is automatically ingested by an API exposed by the credentials-generator application.

    If the process succeded, you should see in the browser (and also the logs of the credentials-generator application) a response similar to the following is returnedone: 

    Code Block
    languagejs
    {
        "clientId" : "5x4x3x4x0x8x-cxlx3xsxcx8xixlxmx3x0xrxgx7x6x3x.apps.googleusercontent.com",
        "clientSecret" : "0xhx9xrx8xdxqx9xDxjxUx3x",
        "refreshToken" : "1x7xmxfx_yxuxNxUxFxjxVxVxkxXx3XxHxMxYxzx5xcxI"
    }


  8. You can now use the information above to populate the configuration properties as reported above.

...

  1. .

...