To setup your Google Admin app in Cobalt for OAuth, you will need the following credentials from your Google Cloud Console dashboard:

  • Client ID
  • Client Secret
  • Scopes

Pre-requisites

  1. Google Cloud Console account. You can create one here.

Required Settings

  • Mandatory Scopes
  1. https://www.googleapis.com/auth/userinfo.email
  2. https://www.googleapis.com/auth/admin.reports.audit.readonly
If you haven’t already created a project in Google Cloud Console, you’d need to create one.

Creating an app in Google Admin

To create a Google Admin app and aquire the above mentioned credentials, please follow the steps mentioned below:

  1. Log in to your Google Cloud Console dashboard.
  2. Click on the Create Project button in the top right.
Navigation for App setup
  1. Enter the Project Name for your application, select Organization and Location.
  2. In the Google Cloud Console dashboard, navigate to APIs and services > Credentials in the left side menu.

Ensure that the correct app is selected by checking the name of the app in the dropdown in the top navigation bar.

Setting up Google Admin app
  1. Go to your Apps catalog in Cobalt > Search for Google Admin > Settings > Use your credentials > Callback Url > Copy it.
  2. Click on + Create Credentials button in the top in the Cloud Console app and select OAuth client ID.

Note: You will need to configure Google’s consent screen for access to Client ID and Client Secret if not done previously.

  1. Select Web application from the Application type dropdown > scroll to Authorized redirect URIs section > Click + Add URI button > Paste the Callback Url > Click Create button in the bottom.
  2. Navigate to OAuth consent screen in the left menu under APIs and services > Click on the Edit App button > Scroll down > Click Save and Continue in the OAuth consent screen section > Click Add or Remove Scopes button in the Scopes section.
  3. Enter the mandatory scopes under Manually add scopes > Click on Add To Table > Click on Update > Click on Save and Continue at the bottom of the page.
Scopes Selection in Google Admin App
  1. Navigate to Credentials in the left menu under APIs and services and select the Web Client under OAuth 2.0 Client IDs. Copy the Client ID and Client Secret under Additional information section.
Getting Credentials

Configuring credentials in Cobalt

App settings page lets you configure the authentication settings for an OAuth2 based application. For your customers to provide you authorization to access their data, they would first need to install your application. This page lets you set up your application credentials.

Setting up application client credentials

Cobalt lets you use pre-configured applications to play around. You can do so by selecting Use our credentials. However, if you wish to use your own application, select Use your own credentials. Provide the aquired Client Id and Client secret and save it.

Configuring Scopes

Cobalt lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under Permissions & Scopes section.

For some applications Cobalt sets mandatory scopes which cannot be removed. Additional scopes can be selected from the drop down. Cobalt also has the provision to add any custom scopes supported by the respective platform.

OAuth Scopes

Once the scopes has been added to the project in Cobalt, go to your Google Cloud Console dashboard and update the scopes as added on Cobalt.

Navigate to Cloud Console dashboard > Select the Project created for Cobalt > Follow the steps 8 and 9 mentioned above for adding scopes.

If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform. And, the scopes selected here are identical to the ones selected in the platform.

Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Google Admin actions and triggers. Following are the set of Google Admin actions and triggers supported by Cobalt.