Fix Google Error: Caller Does Not Have Permission

3 min read Updated on December 1, 2024 Cloudiway Team

Error Message

During a file audit or migration from Google Drive, you may encounter this error:

The service drive has thrown an exception. HttpStatusCode is Unauthorized. The caller does not have permission.

This error indicates that the Google Drive API cannot access the user's files due to permission restrictions in Google Workspace.

Root Causes

This error can occur due to one of two permission issues:

1

Drive App Disabled for User's Group

The user belongs to an organizational unit (OU) or group where the "Drive and Docs" app has been disabled by an administrator.

2

Drive SDK API Access Disabled

The Google Workspace admin setting "Allow users to access Google Drive with the Drive SDK API" is turned off for the affected users.

Solution

To resolve this error, you need to enable both permissions for the impacted users in the Google Admin Console.

Step 1: Enable Drive and Docs App for the User's Group

  1. Sign in to the Google Admin Console
  2. Navigate to Apps → Google Workspace → Drive and Docs
  3. Click on Service status
  4. Select the organizational unit containing the affected users
  5. Ensure the service status is set to ON for everyone
  6. If it was OFF, click Save

Organizational Units

If your organization uses multiple OUs, check that Drive is enabled for each OU where migration users reside.

Step 2: Enable Drive SDK API Access

  1. In the Google Admin Console, go to Apps → Google Workspace → Drive and Docs
  2. Click on Features and Applications
  3. Scroll to find "Drive SDK"
  4. Ensure "Allow users to access Google Drive with the Drive SDK API" is checked
  5. If unchecked, enable it and click Save

Alternative Path

You can also access this setting via:
Security → Access and data control → API controls → Manage Google services
Then enable "Drive SDK" for the appropriate organizational units.

Propagation Time

Changes to Google Workspace settings can take up to 24 hours to propagate, although they typically apply within minutes.

Verify the Fix

After enabling both settings:

  1. Wait at least 15 minutes for changes to propagate
  2. Return to your Cloudiway project
  3. Retry the file audit or migration for the affected user
  4. The error should no longer appear

Still Having Issues?

If the error persists after enabling both settings:
  • Verify the user is in the correct organizational unit
  • Check that domain-wide delegation is properly configured
  • Ensure the service account has the required Drive API scopes
  • Contact Cloudiway support with the user email and error details

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