I was able to create a shared drive under my profile.
I created
Service Account (E.g: test@svc.company.net)I created
G-Suite Account (E.g: test@integration-24524514.iam.gserviceaccount.com)fromService Account (E.g: test@svc.company.net)For the shareddrive created, I assigned below access for each of the profile
- My profile (Manager)
- Service Account (E.g: test@svc.company.net) (Manager)
- G-Suite Account (E.g: test@integration-24524514.iam.gserviceaccount.com) (Manager)
I created a sub folder under the shared drive
I tried to grant access manually from the API Explorer (https://developers.google.com/drive/api/v3/reference/permissions/create) with below details
Request parameters fileId = Ix6yw5La5iTg-n*********
Request body { "role": "reader", "type": "user", "emailAddress": "test@email.com" }
- It works fine when I grant access as My profile (Manager) and Service Account (E.g: test@svc.company.net) (Manager)
- When I try the same through API as G-Suite Account (E.g: test@integration-24524514.iam.gserviceaccount.com) (Manager), it returns below error
com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
"code" : 404,
"errors" : [ {
"domain" : "global",
"location" : "fileId",
"locationType" : "parameter",
"message" : "File not found: Ix6yw5La5iTg-n*********",
"reason" : "notFound"
} ],
"message" : "File not found: Ix6yw5La5iTg-n*********"
}