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 for | IT admins and migration teams responsible for Google Workspace domain moves. |
|---|---|
| APIs | Drive API, Admin SDK |
| Typical scopes | drive, 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
- List all files and folders owned by migrated users using the Drive API.
- Enumerate and map old domain addresses and groups to their new equivalents.
- For each item, update permissions: remove obsolete addresses and re-add the new ones.
- 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.
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 guideRelated 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.