Skip to main content
pdf?stylesheet=default
Blackboard Help

Google Apps

In order for the Google Admin tool to provision Moodle data to Google AppsTM, three tools must be configured:

  1. Google Developers Console.
  2. Google Admin Console.
  3. Google Admin tool in Moodle.

Configuring service account in Google Developers Console

A service account's credentials include a generated email address that is unique, a client ID, and at least one public/private key pair.

To generate service-account credentials, or to view the public credentials that you've already generated, do the following:

  1. Go to the Google Developers Console.
  2. Select a project, or create a new one.
  3. In the sidebar on the left, expand APIs & auth. Next, select APIs. In the list of APIs, find the Admin SDK under Google Apps APIs or by searching. Ensure that the Admin SDK API is turned ON. Note that if you view the Admin SDK, you can review Usage and Quotas which may limit your usage of the API.
  4. In the sidebar on the left, select Credentials.
  5. To set up a new service account, do the following:
    • Under the OAuth heading, select Create new Client ID.
    • When prompted, select Service Account under the Application type option and select P12 Key under the Key type option. Finally, select Create Client ID.
    • A dialog box appears. To proceed, select Okay, got it.

Your new Public/Private key pair is generated and downloaded to your machine; it serves as the only copy of this key. You are responsible for storing it securely. You now have Generate New P12 Key option, and the ability to delete.

You can return to the Developers Console at any time to view the client ID, email address, and public key fingerprints, or to generate additional public/private key pairs. For more details about service account credentials in the Developers Console, see Service accounts in the Developers Console help file.

Later steps in this configuration guide refer back to this service account's Client ID, Email Address and the downloaded P12 Key file.


Delegating domain-wide authority to the service account in the Google Admin Console

These steps must be performed by an administrator of the Google Apps domain:

  1. Go to your Google Apps domain’s Admin console.
  2. 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.
  3. Select API reference from the list of options.
  4. Ensure Enable API access is checked under the API access section. If not, check it and and select SAVE CHANGES.
  5. Select Advanced settings from the list of options. If you don't see Advanced settings, you may need to select the Show more option first.
  6. Select Manage API client access in the Authentication section.
  7. In the Client name field enter the service account's Client ID.
  8. In the One or More API Scopes field enter: https://www.googleapis.com/auth/admin.directory.user
  9. Select Authorize.

The service account is now authorized to make API requests to the Google Apps domain.


Configuring Google Admin tool in Moodle

Steps: Administration > Site administration > Google Admin > Settings

These steps must be performed by an administrator of the Moodle site:

  1. From Site administration select Google Admin and Settings.
  2. On this page, do the following:
    • Ensure that the Disabled setting is not checked, otherwise the tool does not run.
    • Upload your P12 Key file to the Private key file upload setting.
    • In the Client email address field, type in the service account's Email Address.
    • In the Google Apps domain field, type the domain of your Google Apps.
    • In the Google Apps admin account field, type an admin account email address.
    • Review the rest of the configurations on the page and set them as needed. Then select Save changes.

For enhanced functionality of this tool, also enable the Google SAML Auth plugin. From Site administration select Plugins, Authentication, and Manage authentication. Configuration of this authentication plugin is optional.


Google Apps block configuration guide

In order for the Google Apps block, two tools must be configured:

  1. Google Developers Console.
  2. Google Apps block in Moodle.

Configuring web application in Google Developers Console

Please know that this step is optional. By doing this step, users in Moodle can view their latest unread email messages in the Google Apps block.

To generate web application credentials, or to view the credentials that you've already generated, do the following:

  1. Go to the Google Developers Console.
  2. Select a project, or create a new one.
  3. In the sidebar on the left, expand APIs & auth. Next, select APIs. In the list of APIs, find the Gmail API under Google Apps APIs or by searching. Ensure that the Gmail API is turned ON. Note that if you view the Gmail API, you can review Usage and Quotas which may limit your usage of the API.
  4. In the sidebar on the left, select Credentials.
  5. To set up a new web application, do the following:
    • Under the OAuth heading, select Create new Client ID.
    • When prompted, select Web application under the Application type option.
    • In the Authorized JavaScript origins box, type the protocol and domain for your site. Make sure to enter the domain only, do not include any path value. Example: If your host is www.example.com then you would enter the following:

      http://www.example.com
      https://www.example.com

    • Clear any text in the Authorized redirect URIs box.
    • Finally, select Create Client ID.

You can return to the Developers Console at any time to view the Client ID. For more details about account credentials in the Developers Console, see Service accounts in the Developers Console help file.

Later steps in this configuration guide refer back to this web application's Client ID.


Configuring Google Apps block in Moodle

Steps: Administration > Site administration > Plugins > Blocks > Google Apps

The following steps must be performed by an administrator of the Moodle site:

  1. From Site administration select Plugins, Blocks, and Google Apps.
  2. In the Google Apps domain field, enter the domain of your Google Apps.
  3. If you created a web application in the Google Developers Console above, then in the Client ID field, enter the web application's Client ID.
  4. Review the remaining settings on the page and select on Save changes.
  5. The Google Apps block can now be added to various pages throughout Moodle.