I am trying to change ownership of a file in Google Drive using the following call:
PATCH https://www.googleapis.com/drive/v3/files/XXXXXX/permissions/YYYYY?transferOwnership=true&useDomainAdminAccess=true
{
"kind": "drive#permission",
"role": "owner"
}
However, I get this in return:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Team Drive not found: XXXXXX",
"locationType": "parameter",
"location": "teamDriveId"
}
],
"code": 404,
"message": "Team Drive not found: XXXXXX"
}
}
XXXXXX is definitely a file that exists. The problem still happens with supportsTeamDrives=false
.