Using a service account on GCP and impersonated as a google worspace user using the domain wide delegation with following scopes
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.file
Creating a document with an specific user with no problems. Patching them without problems. Gettings revisions list with no problems. But trying to publish a revision we're getting
//auth
const options: GoogleAuthOptions<any> = {
credentials: JSON.parse(Config.GoogleCredentials ?? ""),
scopes: SCOPES,
clientOptions: {
subject: "[email protected]",
}
};
Request:
{
"published": true,
"publishedOutsideDomain": false,
"publishAuto": false
}
Response:
{
"error": {
"code": 403,
"message": "The user does not have sufficient permissions to publish revisions for this file.",
"errors": [
{
"message": "The user does not have sufficient permissions to publish revisions for this file.",
"domain": "global",
"reason": "insufficientFilePermissions"
}
]
}
}
Same scenario works fine with other two different workspaces. We tried to assign different permissions on the files including anyone, writer. With all possible combinations with no luck. Even the error message seems don't have any sense since there's no way to assign specific permissions to that action. The only permission against a file are write/read.
Is there any workspace configuration to take in consideration?
thanks in advance.
I'm trying to publish a file revision. Works in different workspaces but no in one in particular. What is the configuration specific to take in consideration.