. Docs  . Admin Guide  . Google for Kora SSO

Google for Kora SSO

For Enterprise admins of Kora in the G-suite domain, access to emails, drive and Distribution Lists in their domain is restricted by Google. In order to provide access, a service account needs to be created on behalf of the G-Suite System administrator in the Google cloud platform and required scopes need to be added for domain-wide delegation of authority.

If you choose to ‘Access DLs’ from Kora, the below steps need to be completed and configurations in the Kora Enterprise admin console.

Refer to the following links for further details:

Create the service account and credentials

The following are the steps to create a service account and its credentials, which are required for G Suite domain-wide delegation of authority. Your code uses the credentials created here to authorize the actions the service account takes.

  1. Open the Service accounts page. If prompted, select a project, if no project available create one by clicking CREATE PROJECT and then continue to select a project.
  2. Click + Create Service Account, enter a name and description for the service account. You can use the default service account ID, or choose a different, unique one. When done click Create.
  3. Skip the optional Service account permissions (optional) section  and click Continue.
  4. On the Grant users access to this service account screen, scroll down to the Create key section. Click + Create key.
  5. From the side panel, select the format for your key: JSON is recommended.
  6. Click Create. Your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of this key. For information on how to store it securely, see Managing service account keys.
  7. Click Close on the Private key saved to your computer dialog, then click Done to return to the table of your service accounts.

To enable G Suite domain-wide delegation, follow these steps:

  1. Locate the newly-created service account in the table. Under Actions, click on 3 dots then Edit.
  2. In the service account details, click Show domain-wide delegation, then ensure the Enable G Suite Domain-wide Delegation checkbox is checked.
  3. If you haven’t yet configured your app’s OAuth consent screen, you must do so before you can enable domain-wide delegation. Follow the on-screen instructions to configure the OAuth consent screen, then repeat the above steps and re-check the checkbox.
  4. Click Save to update the service account, and return to the table of service accounts. A new column, Domain-wide delegation, can be seen. Click View Client ID, to obtain and make a note of the client ID.

Ensure that “Admin SDK”, “Gmail APi” and/or “Drive API” is enabled for the already selected project, by following the below steps

  1. Tap on Navigation Menu on Top Left
  2. Click on APIs & Services
  3. Click on Library
  4. Search for ‘Admin SDK’ in search box
  5. Click on and open  ‘Admin SDK’
  6. Make sure it is Enabled
  7. Follow the steps 4-6 for “Gmail APi” and “Drive API”, if needed.

Delegate domain-wide authority to your service account

The service account that you created needs to be granted access to the G Suite domain’s user data that you want to access. The following tasks have to be performed by an administrator of the G Suite domain:

  1. Go to your G Suite 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.
  3. Select Advanced settings from the list of options.
  4. Select Manage API client access in the Authentication section.
  5. In the Client name field, enter the client ID obtained from the service account creation steps above.
  6. In the One or More API Scopes field enter the scopes required for your application (for a list of possible scopes, see Authorize requests).

  7. Click the Authorize button.

Your service account now has domain-wide access to the Google Admin SDK Directory API, Gmail API and/or Drive API for all the users of your domain. You are ready to instantiate an authorized Admin SDK Directory, Gmail and Drive service object son behalf of your G Suite domain’s users.

Note: Only users with access to the Admin APIs can access the Admin SDK Directory API, Gmail API and Drive API, therefore your service account needs to impersonate one of those users to access the Admin SDK Directory API, Gmail API and Drive API. Additionally, the user must have logged in at least once and accepted the G Suite Terms of Service

Once the above steps are completed, the following details need to be entered into the Kora Enterprise Admin console:

  • Client Email,
  • Private Key and
  • Admin Email.

The fields Client Email and Private Key can be retrieved from the downloaded JSON key file, they are client_email and private_key.

Admin Email is the admin email id of the Gsuite domain.