Problem
The error happens when either performing Audit or Migrate files from Google Drive.
Error: Migration Error for ****** : The service drive has thrown an exception. HttpStatusCode is Unauthorized. The caller does not have permission
Cause
The permission for App “Drive and Docs“ or “Drive SDK API“.
-
If these users belong to a group where App “Drive and Docs“ is turned off.
-
If the settings “Allow users to access Google Drive with the Drive SDK API is turned off for these users.
Resolution
Turn on both the permissions for the users.
For more details:
Allow third-party apps for Drive files – Google Workspace Admin Help