A workaround for the Google Docs “cannot transfer ownership” problem

_Sorry-cannot-transfer-ownership

So, if you’ve just arrived here from a web search, it’s probably because you’ve just come across the Google Docs/Google Drive error message “Sorry, cannot transfer ownership to xxxx. Ownership can only be transferred to another user in the same domain as the current owner.” Although I haven’t found a direct solution to this, I have found a just-about-acceptable workaround, so read on.

Please note: as with all software-related issues more than a few months old, things have moved on, so do read all comments at the end of this post thoroughly.

I guess this restriction in Google Docs is a security feature of some sort. However, reading the forums, it’s a real frustration for a number of organisations who are moving from a single Google account to a full-blown Google Apps For Business setup. When they do this, the first thing they want to do is to migrate their documents over to the new account. But they can’t, because of the restriction above. In some cases, the “domain” may look the same, but as far as Google’s concerned, it isn’t.

The workaround to the problem is to copy the documents over to the new Google account(s). There they will be owned by the new account, and once you’ve checked they’re all in place, you can safely delete them from the old account.

Here’s how you do it – I found the answer here on the Google Product Forums.

Firstly, find all the docs in the old Google Account which are actually owned by that account, and give the new account access to them. To do this, just go to “All Items”, click the tiny down arrow in the search box at the top, and select “owned by me”; select all, and put all the files in a new folder you create. If there are a lot of files, you might want to test this out with one or two, and perhaps do the migration in batches.

Select the new folder, and click the sharing button (the one with the people and the + symbol), and invite the new account (if you’re using Gmail on the new account, send an email). Click on the folder and make a copy of the folder’s URL, which you’ll need in a minute, or you’ll also be able to find the link in the email which will be waiting in the new account.

Now, go to the new Google Account and paste this into the browser:
https://script.google.com/macros/s/AKfycbzjS8m5Cg6OTcnGaBi1IevR8FkJRI5ZdlUWFsLnSFw5S0s0X9E/exec

It’s a script which will copy over a folder to which the account has access, in this case the folder of documents to be transferred, in the old account. You’ll be asked to paste in the folder URL, which you just made a note of. There’s then a load of crunching (it can take a few minutes), after which you’ll get an email saying everything’s been copied over …although you’ll be able to see that.

Check the documents have indeed been copied over. Don’t forget these are *new, separate copies*. You can, if you wish, now go back to the old account and delete the old versions. If you don’t, I would recommend at least removing all sharing from the documents which have been copied, so that nobody ever looks at the redundant archive copies again, other than the original account owner.