# Transfer Google Workspace User Data

Transfer a departed user's Google Drive files and Calendar events to a new owner

This tool moves a user's Google Drive files and Calendar events to a different user. Use it when someone leaves and a manager or teammate must own their files and events.

## What this tool does

When the tool runs, it:

1. Finds both users in Google Workspace.
2. Starts a Google Workspace data transfer for Drive, Calendar, or both:
   - **Drive**: the private files and the shared files go to the new owner.
   - **Calendar**: the events go to the new owner, and Google releases the resources, for example rooms, that the old user booked.
3. Returns a confirmation with the transfer ID.

The transfer runs in the background on Google's servers. The tool does not wait for it to finish. A large transfer can take several hours. To see the progress, open the **Data Transfer** page in the Google Admin console.

The tool does not suspend or delete the old user. To suspend the user, use [Set Google Workspace User Suspension](https://www.tryrisotto.com/docs/integrations/tools/google/set_user_suspension).

## Prerequisites

- The [Google Workspace tools connector](https://www.tryrisotto.com/docs/integrations/google-workspace-tools) is connected. The tool runs on the connector's grant. It does not use the **Admin API** card on **Settings > Integrations > Google Workspace**.
- The connector grant includes the `https://www.googleapis.com/auth/admin.datatransfer` scope. When you add this tool, Risotto adds the scope to the connector consent. An admin must click **Reconnect** on the connector and approve the scope. The tool also uses `admin.directory.user.readonly`, which is a default scope.
- The Google admin who gave consent has the **Data Transfer** admin privilege.
- Drive and Calendar are available for transfer in the **Data Transfer** settings of the Google Admin console.

## Enable the tool

1. Select **Tools** in the sidebar.
2. In the **Tool groups** list, select **Google**.
3. On the **Google Workspace Transfer User Data** row, click **Enable**.

Risotto names the new tool **Transfer Google Workspace User Data**. The tool has **Approval** set to **Required** by default, so an approver must accept each transfer before it starts.

## Parameters

The tool has no **Restrict to Requestor Only** option.

| Parameter         | Required | Description                                                                    |
| ----------------- | -------- | ------------------------------------------------------------------------------ |
| `from_user_email` | Yes      | The email address of the user who left. The tool moves this user's data.       |
| `to_user_email`   | Yes      | The email address of the user who gets the data. It must not be the same user. |
| `data_types`      | No       | `drive`, `calendar`, or `both`. Default: `both`.                               |

## Troubleshooting

### was not found in Google Workspace

Make sure both email addresses belong to users in your Google Workspace
domain.

### is not available for data transfer in this Workspace

Google Drive or Google Calendar is not available for transfer. Check the
**Data Transfer** settings in the Google Admin console.

### Google refused the call

The connector grant does not include the `admin.datatransfer` scope, or the
admin who connected it does not have the **Data Transfer** privilege. Click
**Reconnect** on the connector and approve the scope.

### The from-user and to-user cannot be the same

Give a different user as the new owner.

## Related

- [Google Workspace tools connector](https://www.tryrisotto.com/docs/integrations/google-workspace-tools)
- [Set Google Workspace User Suspension](https://www.tryrisotto.com/docs/integrations/tools/google/set_user_suspension)
- [Sign Out Google Workspace User](https://www.tryrisotto.com/docs/integrations/tools/google/sign_out_user)

Source: https://www.tryrisotto.com/docs/integrations/tools/google/transfer_user_data
