In order to allow Staffbase to access your organization’s Google Workspace securely, you need to configure the Google Workspace connection with Google OAuth Client ID and Client Secret.
To obtain Google OAuth Client ID and Client Secret, you need to do the following:
Prerequisites
- You have a Google Enterprise subscription.
- You have admin rights for the Google Workspace account you want to connect.
Creating a Project
- Sign in to the Google Cloud Platform.
- Navigate to Dashboard and click Create project.
The page to create a new project opens.
If you have already created at least one project, click the project dropdown in the header to open a dialog from which you can create a new project. - Provide a name for your project. For example, staffbase-connection
- Click Create.
You have created a project.
Enabling Google Drive API and Google Calendar API
You enable each API separately. Go through these steps for each of the APIs:
- Google Drive API
- Google Calendar API
- In the Google Cloud Platform, open the project you created.
- From the left menu, navigate to APIs & Services > Enabled APIs & services.
- Click Enable APIs and Services.
- Search for Google Drive API or Google Calendar API and click it.
- Click Enable.
- If necessary, repeat these steps from the start to enable another Google API.
You have enabled Google Drive API for the project you created.
Creating an OAuth Consent Screen
After enabling the Google Drive API, you need to configure the OAuth consent screen that allows users to sign in to their Google account from the Staffbase platform. Users will see this authentication screen when signing in to their Google account through the Staffbase employee app for the first time.
- In the Google Cloud Platform, navigate to the project you created > OAuth consent screen.
- Under User Type, select Internal.
- Click Create.
- Under App Information, provide:
- App name
- User support email
- App logo
- Under Authorized domains, provide your Staffbase platform domain.
- Under Developer contact information, provide the email address of your IT department.
- Click Save and continue.
- Click Add or remove scopes.
- Select the scope options:
- For Google Drive API: auth/drive.metadata.readonly
- For Google Calendar API: auth/calendar.events.readonly
- Click Update.
- Click Save and continue.
You have configured the OAuth consent screen and can now see a summary of the configured settings.
Creating the Client ID
After configuring the scope of your project, you can set up the client ID. The client ID is needed to configure the Google Workspace connection in the Staffbase platform and connect your organization’s Google account to the Staffbase environment.
- From the project you created, navigate to Credentials.
- Click Create credentials and then select OAuth client ID from the dropdown menu.
- Under Application type, select Web application from the dropdown menu.
- Under Name, provide a name for your client. For example, staffbase-connection-client.
- Under Authorized JavaScript origins, click Add URI.
- Provide all possible URIs at which your employee app or intranet can be reached. For example, https://app.staffbase.com or https://staffbase.yourdomain.com.
- Under Authorized redirect URIs, provide the redirect URI.
To create the redirect URI, you need to suffix your domain URI with/api/integrations/auth/googleWorkspace/callback
Example of a final redirect URL:
https://staffbase.yourdomain.com/api/integrations/auth/googleWorkspace/callback
- Click Create.
You’ve created your client ID. You can now copy this client ID and use it to configure the Google Workspace connection.
Comments
0 comments
Please sign in to leave a comment.