domainwidedelegation.comStart free

Use cases → Admin and governance

Transfer data from a suspended Workspace user

Move Drive and email data from a suspended user to an active account using a delegated service account, avoiding manual intervention.

Who it is forWorkspace administrators handling offboarding or accidental user suspensions.
APIsAdmin SDK, Drive API, Gmail API
Typical scopesadmin.directory.user, drive, gmail.modify

The problem

When a user is suspended, their data remains but is inaccessible to them and not automatically reassigned. Manual transfer is slow, error-prone, and can miss important items if not scripted correctly.

How it works

  1. Use the Admin SDK to confirm the user is suspended and retrieve their user ID.
  2. With domain-wide delegation, impersonate the suspended user to access their Drive and Gmail data.
  3. Transfer ownership of Drive files to the destination account using the Drive API.
  4. Forward or label Gmail messages as needed via the Gmail API.
  5. Log all actions and confirm successful transfer for each item.

What changes

Data is preserved and reassigned quickly, reducing risk and operational overhead during staff changes or account suspensions.

The trap in this one. Drive API's 'transferOwnership' calls will silently fail for files in shared drives, as ownership cannot be reassigned there—even with admin rights. This leaves files stranded with no warning unless you explicitly check the 'driveId' field and handle shared drive items separately.

Watch it explained

“How to Export Google Workspace Data 2026 Easily” — PMN Online on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.

Questions people ask

Can I transfer all data in one go?

No, you must enumerate and transfer each file individually. Bulk transfer is not supported, and rate limits can throttle large operations.

Does this pattern work if the user was deleted, not just suspended?

No, once deleted, impersonation is impossible. The transfer must be initiated while the account exists, even if suspended.

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

Automate joiners, movers and leavers

Create accounts, set group membership, provision Drive and hand over mailboxes without a manual checklist.

Continuously verify your delegation still works

A scheduled probe that proves every API still answers under every tenant, before a customer finds out otherwise.

Reduce an over-broad delegation grant safely

Find out which scopes your automation genuinely uses, then cut the grant down to them.