Drive API - Service account jwt cannot delete file - "insufficientFilePermissions"

I am using service account to delete the file for personal drive not shared drive. I have shared the file with the service account email with Editor access. 

I can move the files using api, however getting insufficientFilePermissions error on delete.

Can service account delete the files? What permissions do we need to provide them?

Note - this is not for Shared drive. For shared drive, giving Manager role to service account as member works. This is for personal drive.

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
DELETE https://www.googleapis.com/drive/v3/files/2GZudsfdsecCk45dfgtz142wvjDPCxxwsEm9?quotaUser=0435kljkdf-...
{
  "code": 403,
  "errors": [
    {
      "domain": "global",
      "message": "The user does not have sufficient permissions for this file.",
      "reason": "insufficientFilePermissions"
    }
  ],
  "message": "The user does not have sufficient permissions for this file."
}

1 0 71
0 REPLIES 0