domainwidedelegation.comStart free

Use cases → Documents and Drive

Transfer ownership of project folders via API

Move Drive folder ownership between users to match project handovers, without manual sharing and download-reupload steps.

Who it is forIT operations and automation engineers managing project-based teams or rotating responsibilities.
APIsDrive API, Admin SDK
Typical scopesdrive, admin.directory.user

The problem

When a project lead changes, folders must be handed over or risk being orphaned if the original owner leaves. Manual transfer is slow, error-prone, and doesn't scale when ownership changes are frequent or need to be backdated.

How it works

  1. Identify the folder and current owner, ensuring the service account is a Drive delegate for both.
  2. Insert the new owner as a writer on the folder and all contained files.
  3. Promote the new user to 'owner' on every file and subfolder, then remove the old owner's ownership.
  4. Log the transfer and verify that all items now show the correct owner.

What changes

Ownership is systematically reassigned with a clear audit trail, minimising orphaned content and manual intervention.

The trap in this one. The Drive API's 'transferOwnership' on folders only changes the folder itself; nested files and subfolders retain the old owner unless explicitly updated. If you miss a recursive walk or hit rate limits mid-transfer, the folder tree ends up with mixed ownership and unpredictable sharing. There is no atomic operation—partial completion is possible and hard to detect unless every file is checked after the fact.

Questions people ask

Does the new owner receive notification of the transfer?

Yes, they get an email for each ownership change, which can be noisy for large folders.

Can ownership be transferred between users in different domains?

No, Drive only allows ownership transfer within the same primary domain.

Want this built?

This is a pattern we run in production. We will set up the delegation and build this on top of it — $500 per hour, most of it working the same day.

Talk to us Or read the setup guide

Related use cases

Reassign Drive permissions in bulk with delegation

Use a delegated service account to change or transfer Drive file permissions at scale, for user transitions or access audits.

Bulk remove external sharing from Drive files

Audit and revoke third-party access to Drive files in bulk using a service account, to close off lingering external shares after projects or audits.

Automatically remove ex-employees from Shared Drives

Use delegated automation to ensure former staff are promptly and reliably removed from all Shared Drives they could access.