Skip to content

Google Workspace SSO

This guide covers how to configure Single Sign-On (SSO) using Google Workspace for your Mainbranch workspace.

Google Workspace SSO enables your users to sign in to Mainbranch using their Google Workspace accounts. This provides:

  • Seamless sign-in experience
  • Centralized authentication
  • Automatic access management
  • Support for Google’s MFA policies

Before configuring SSO:

  • Admin access to Mainbranch
  • Google Workspace admin access
  • Access to Google Cloud Console
  1. Create OAuth Client in Google Cloud

    Access the Google Cloud Console and create an OAuth 2.0 client for Mainbranch.

  2. Configure Redirect URI

    Add the Mainbranch redirect URI to your OAuth client configuration. The URI is provided in your Mainbranch admin console.

  3. Obtain Credentials

    Copy the Client ID and Client Secret from Google Cloud.

  4. Enter Credentials in Mainbranch

    Go to Workspace settings > Setup > Authentication and enter:

    • Client ID
    • Client Secret
  5. Configure Domain

    Specify your organization’s Google Workspace domain.

  6. Test the Connection

    Test SSO by signing out and signing back in with Google.

  1. Go to Google Cloud Console
  2. Select your project (or create a new one)
  3. Navigate to APIs & Services > Credentials
  4. Click Create Credentials > OAuth client ID
  5. Select Web application
  6. Add the Mainbranch redirect URI
  7. Save and copy the credentials

Mainbranch requires these OAuth scopes:

  • openid — Basic authentication
  • email — User email address
  • profile — User profile information

For organizations with one Google Workspace domain:

  1. Enter your domain (e.g., yourcompany.com)
  2. Only users from this domain can sign in

If your organization uses multiple domains:

  • Contact support for multi-domain configuration
  • Each domain may require separate setup

When SSO is configured:

  • Users signing in for the first time are automatically added
  • No manual invitation required
  • Users inherit default member role

To limit who can access Mainbranch:

  • Use Google Workspace group restrictions
  • Configure Mainbranch to require invitations
  • Remove users who should not have access

If you need to update OAuth credentials:

  1. Generate new credentials in Google Cloud
  2. Update in Mainbranch admin console
  3. Old credentials are invalidated immediately

To disable SSO:

  1. Go to authentication settings
  2. Disable Google SSO
  3. Users will need alternative sign-in method
  • Restrict OAuth client to your domain
  • Enable Google’s advanced security features
  • Monitor authentication logs
  • Rotate credentials periodically

Google Workspace MFA is supported:

  • Users with MFA enabled will complete MFA during sign-in
  • Mainbranch respects Google’s MFA policies
  • No additional Mainbranch MFA configuration required
  • Verify Client ID is correct
  • Check that the OAuth client exists
  • Ensure credentials are not expired
  • Verify redirect URI matches exactly
  • Check for trailing slashes
  • Ensure HTTPS is used
  • Verify domain configuration
  • Check user’s email domain
  • Ensure domain is verified in Google Workspace
  • Verify SSO is properly configured
  • Check user’s Google account status
  • Review authentication logs
  • Test with a non-admin account first
  • Document your configuration
  • Have a backup authentication method
  • Review OAuth client settings periodically
  • Monitor for authentication issues
  • Keep Google Cloud project organized
  • Use dedicated OAuth client for Mainbranch
  • Don’t share credentials
  • Enable Google’s security alerts