We have a google corporate account and need to transfer ALL of a user's google drive files to another account in certain instances. We want to do what is described at the following link for "all files" but programatically via the latest Drive API http://support.google.com/a/bin/answer.py?hl=en&answer=1247799
We are currently using the following API version(s) below, coupled with domain wide authority delegation as described at https://developers.google.com/drive/delegation and are able to see a user's files, iterate over them etc.
My question is this: it appears that the only way to change permissions is by fileId by fileId etc. Instead of having to traverse and iterate over an entire set of user's files, if we just want to transfer ALL of a user's files to another particular user: is there a way in the API to do this (ownership transfer for ALL files) rather than individual requests file/by file?
Also when transferring ownershisp, must the transferee be in the same @domain or can it be another @domain we manage? I read somewhere that you can only transfer to owners in the same domain. Does this still hold true? For instance we manage @myCompany.com and have our corporate account registered under that, however that shell account has several sub-domains within it. We would like to transfer files from users in the sub-domains to a central user in the @myCompany domain.
However, in the case where you have employees leaving, or you need to transfer everything, using the following method is fast and simple. Open the Google Admin console Go to Google Apps > Drive Click on "Transfer ownership" Fill out both user fields and submit
If you want to transfer ownership of a folder to a new user, the first step is to enter the admin console. Now that you’re in the admin console, first enter the “apps” section. This will let you access all Google Apps, such as Google Docs and Drive. In the admin console, the “apps” section contains all Google Apps, including Google Docs and Drive.
From the Admin console Home page, go to Apps Google Workspace Drive and Docs. Click Transfer ownership. Note: You need the Drive service privilege and the Data Transfer privileges to see this option. In the From user field, enter the current owner's username and select the corresponding suggested result.
This answer doesn't directly answer your question, but it could be helpful for both you and future visitors. As of now, you can mass transfer files to new users with Google's new Admin console. It doesn't let you filter for specific folders, but it does allow you to transfer all of one user's Drive files to a second user.
You need to change permissions file by file, there is no updateAll
type of functionality at the moment.
You cant transfer the ownership to another domain's user. Ownership can only be transferred to another user in the same domain as the current owner.
This answer doesn't directly answer your question, but it could be helpful for both you and future visitors.
As of now, you can mass transfer files to new users with Google's new Admin console. It doesn't let you filter for specific folders, but it does allow you to transfer all of one user's Drive files to a second user.
I know you were trying to create something which uses the API to iterate through folders and files, and you probably have a very specific use-case in mind. However, in the case where you have employees leaving, or you need to transfer everything, using the following method is fast and simple.
This process will even email both users once the process is completed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With