How do I transfer ownership of a file for a document that the administrator does not own?
Using case
- As an administrator account, transfer ownership of documents using the Google Docs API, similar to cPanel's built-in "Advanced Tools" → "Transfer Document Ownership"
Limitations
- APIs
-
invoked in the context of the Google Apps Service Administrator account, not the end user account, as APIs are called from Google Apps Script on the Site page
-
Authorization - OAuth 1.0 as this Script app supports
What works:
- Transferring ownership of your own administrator account accounts to another user account as described here
What is needed:
- Transfer ownership of other user files, ideally without sharing any permissions with the administrator account; if there is no other way to do this, they can share edit rights on the file with the Administrator service account.
-
This currently returns
"ServiceException - you do not have permission to share these items:"
source to share
What you are trying to do is perhaps impersonate the user using an administrator account. The documentation shows you how to do this here .
Essentially, start by requesting the API URL from default
to the new owner address. The request must be fulfilled even though it is allowed as user admin.
https://docs.google.com/feeds/user@yourdomain.com/private/full/
After requesting this url, all channel urls will be returned with the pre-existing post. Then just change the ownership as usual.
source to share