Fix Gmail Error: Mail Service Not Enabled

3 min read Updated on December 1, 2024 Cloudiway Team

Error Message

During a mail migration from Google Workspace to Microsoft 365, you may encounter the following error:

The service Gmail has thrown an exception. HttpStatusCode is BadRequest. Mail service not enabled.

This error indicates that the Gmail API cannot access the user's mailbox because the Gmail service is not properly enabled or the user lacks the required license.

Possible Causes

This error can occur due to one of the following reasons:

  1. The user being migrated lacks a valid Google Workspace license - The user account doesn't have Gmail enabled or has an insufficient license tier.
  2. The migration service account is not properly licensed - The account used by Cloudiway to connect to Google Workspace needs appropriate permissions.
  3. The Gmail API has not been enabled - The Gmail API must be enabled in your Google Cloud Console project.

Solution 1: Check User License

Verify that the user you're trying to migrate has a valid Google Workspace license with Gmail access:

  1. Sign in to the Google Admin Console
  2. Navigate to Directory → Users
  3. Find and click on the user experiencing the error
  4. Click on Licenses in the user details
  5. Verify that a Google Workspace license (Business Starter, Standard, Plus, or Enterprise) is assigned
  6. Ensure Gmail is enabled under the Apps section

License Types

Users with "Cloud Identity Free" or suspended accounts do not have Gmail access and cannot be migrated. They need a full Google Workspace license.

Solution 2: Check Migration Account License

The migration account configured in your Cloudiway connector must also have a valid license:

  1. Identify the migration account email address from your Cloudiway connector settings
  2. In Google Admin Console, verify this account has:
    • A valid Google Workspace license
    • Super Admin or appropriate delegated admin rights
    • Gmail service enabled
  3. If using domain-wide delegation, ensure the service account is properly configured

Solution 3: Enable Gmail API

The Gmail API must be enabled in your Google Cloud project. Follow these steps:

  1. Go to the Google Cloud Console
  2. Select your project (or create one if needed)
  3. Navigate to APIs & Services → Library
  4. Search for "Gmail API"
  5. Click on Gmail API in the results
  6. Click Enable if it's not already enabled

Complete Service Account Setup

For detailed instructions on setting up your Google service account with all required APIs and permissions, see our Google Service Account Creation guide.

Verify the Fix

After applying the appropriate solution:

  1. Wait a few minutes for changes to propagate (Google changes can take up to 24 hours, but usually apply within minutes)
  2. Go to your Cloudiway project
  3. Test the connector connection
  4. Retry the migration for the affected user

Still Having Issues?

If the error persists after trying all solutions, please contact Cloudiway support with:
  • The affected user's email address
  • Screenshot of the error from Cloudiway logs
  • Confirmation of license and API status

Was this article helpful?

Need more help? Contact our support

We value your feedback

Help us improve your experience

What would you like to share with us?

Need direct support? Open a ticket