domainwidedelegation.comStart free

Use cases → Documents and Drive

Repair Drive permissions after a domain migration

Restore access to Drive files and folders after migrating users between Google Workspace domains using a delegated service account.

Who it is forIT admins and migration teams responsible for Google Workspace domain moves.
APIsDrive API, Admin SDK
Typical scopesdrive, admin.directory.user

The problem

After migrating users to a new domain, file and folder sharing breaks where old addresses or groups are hard-coded. Users lose access, shared links fail, and support tickets spike until permissions are corrected.

How it works

  1. List all files and folders owned by migrated users using the Drive API.
  2. Enumerate and map old domain addresses and groups to their new equivalents.
  3. For each item, update permissions: remove obsolete addresses and re-add the new ones.
  4. Log every change for audit and roll-back purposes.

What changes

File access matches the new user directory, restoring collaboration and reducing support load after a migration.

The trap in this one. Drive API batch permission updates are eventually consistent, and changes may not be visible for several minutes—scripts that verify access immediately after updating can produce false negatives, leading to duplicate or missed permissions. Always introduce a delay or a retry loop when validating permission changes, or you will waste hours chasing phantom errors.

Questions people ask

Can this fix permissions on Shared Drives as well as My Drive?

Yes, but Shared Drives have stricter membership and permission models. You must ensure both the user and the service account are members before updating permissions, or calls will fail silently.

How do I map old addresses to new ones reliably?

Build a mapping from the migration manifest or directory export; do not trust email aliases alone, as users may have changed names in the process.

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.