Favicon

You are here: Home > Device Management > Integrations > SSO > Google Workspace

How to Configure Google Workspace Integration

Configure Google Workspace with Applivery MDM — set up OAuth 2.0 credentials for seamless Device Management and SSO integration.

5 min read

TL;DR

Configure Google Workspace with Applivery MDM by setting up a Google Cloud Platform project, configuring OAuth 2.0 credentials, and enabling API access.

Warning

This is a premium feature that might not be available in your current plan. Check the availability on our pricing page.

To configure it, make sure you have admin access to your organization’s Google Workspace. This way, you can either create a new project or get the permissions needed to set up OAuth 2.0 credentials for an existing project.

Please follow the next steps carefully.

Set up your Google Workspace

1
Create a new Google Cloud Platform (GCP) project

Log in to the Google Cloud Platform console. This is separate from your Google Workspace console.

A Google Cloud project is required to enable Google Workspace APIs. Navigate to IAM & Admin > Create Project. Name the project and select Create.

Then, navigate to APIs & Services and click on + Enable APIs and Services. This action will load the API Library. Once in the library, search for admin, choose the Admin SDK API and proceed to enable it.

Return to the APIs & Services page and go to Credentials. You will see a warning that you need to configure a consent screen. Select Configure Consent Screen.

Verify the project name listed in the upper left corner near the logo to make sure that you are using the correct project.

Credentials | Applivery
2
Configure the consent screen

Select Internal as the User Type. This choice restricts authorization requests to users within your Google Workspace, preventing access for individuals with standard Gmail addresses.

Provide a name for the application, include a support email, and fill in the contact fields. Keep in mind that the Google Cloud Platform requires an email in your account.

You can leave the Scopes page empty.

Once the summary page loads, save your settings and exit.

3
Configure the credentials

Return to the Credentials page and select + Create Credentials > OAuth client ID.

68747470733a2f2f6465762d646f63732e636c6f7564666c6172656163636573732e6f72672f6163636573732f7374617469632f636c6f7564666c6172652d6f6e652f6964656e746974792f6773756974652f6372656174652d6f617574682e706e67 | Applivery

Choose Web application as the Application type.

For the Authorized redirect URIs box, input:

https://mdm-portal.applivery.io/login/<workspace_id>.

Google will provide the OAuth Client ID and Secret values. Remember that the secret field functions as a password and should be kept confidential. Copy both values.

On your Google Admin console, go to Security > Access and data control > API controls, open the Settings menu, and enable the Trust internal, domain-owned Apps option.

Untitled | Applivery

Get the Service Provider information from Applivery

Once in the Applivery Dashboard, go to your Workspace Settings 1 from the top dropdown menu, then open Login providers 2 in the left-hand menu and click the Google Workspace option under the MDM Portal section 3.

google Workspace login provider

You will see your Google Workspace configuration, where you will need to input the Client ID and Client Secret fields.

google Workspace

Troubleshooting

Error 5137: Could not retrieve user groups (invalid_grant)

When a user tries to enroll a device through the MDM Portal, they may see the following error:

5137: {"reason":"Could not retrieve user groups","err":"invalid_grant"}

This error means that Applivery's authorization to read Google Workspace groups has expired or been revoked. To fix it, you need to reauthorize Applivery from the Dashboard:

1
Open your Workspace Settings

Once in the Applivery Dashboard, click the top-right dropdown menu and go to Workspace Settings.

2
Reauthorize Applivery

In the left-hand menu, go to Login providers and click Configure next to the Google Workspace option under the MDM Portal section.

Under Step 2, reauthorize to grant Applivery permission to obtain groups again.

reauthorize

Once the reauthorization is complete, the enrollment flow should work without errors.

Key Takeaways

  • Google Cloud Platform project is required for Google Workspace API access.
  • OAuth 2.0 credentials are essential for secure integration.
  • Admin access to Google Workspace is needed for configuration.
  • Client ID and Secret must be kept confidential.
  • Trust internal, domain-owned apps option needs to be enabled in Google Admin console.

You need admin access to your Google Workspace and a plan that includes this premium feature. You must create a Google Cloud Platform project and set up OAuth 2.0 credentials.

Log in to the GCP console, navigate to IAM & Admin > Create Project, name it, and create it. Then, enable the "Admin SDK API" in APIs & Services.

Select "Internal" as the User Type. This restricts authorization requests to users within your Google Workspace, preventing access for standard Gmail accounts.

The authorized redirect URI is `https://mdm-portal.applivery.io/login/<workspace_id>`. Remember to replace `<workspace_id>` with your actual workspace ID.

In the Applivery Dashboard, go to Workspace Settings > Login providers, select Google Workspace under MDM Portal, and enter the values into the Client ID and Client Secret fields.

This error indicates that Applivery's authorization to read Google Workspace groups has expired or been revoked.

To fix it, go to the Applivery Dashboard, navigate to Workspace Settings > Login providers > Google Workspace, and click "Reauthorize" to grant permissions again.

Last updated: May 25, 2026