# Migrate Google Drive to OneDrive

> The folder tree carries across cleanly; the friction is Google-native file formats and what OneDrive will let an API set.

Source: https://migratly.dev/migrate/gdrive-to-onedrive/

Migratly migrates Google Drive to OneDrive by reading both APIs live, deriving the mapping between them, and
presenting it for approval before anything is written. This pair covers **8 entity types**
and **22 field mappings**: 7 carry across intact, 13 are flagged as lossy,
partial, dropped or needing another route, and 5 need a decision from you. The Google Drive side is
read-only for the whole run.

## How the structure changes

- The folder tree is recreated first, parent before child, so every file has somewhere to land.
- Google Docs, Sheets and Slides have no OneDrive equivalent and are exported to Office formats on the way across.
- Sharing permissions are re-granted by email — both organisations must share or federate identities for this to match.
- OneDrive auto-versions on every upload, so revision history is normally carried as the latest revision only.
- Drive shortcuts have no OneDrive equivalent; they become a shared link stored in a sidecar file at the shortcut's location.

## Entity map

| Google Drive | OneDrive | Wave | Fields |
|---|---|---|---|
| Drive | Drive | 0 | 2 |
| User | User | 0 | 3 |
| Folder | Folder | 1 | 3 |
| File | File | 2 | 6 |
| Comment | Comment | 3 | 2 |
| Permission | Permission | 3 | 3 |
| Revision | Version | 3 | 2 |
| Shortcut | SharedLink | 4 | 1 |

## Field coverage

### Drive → Drive

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `name` | `name` | Lossy | OneDrive does not allow creating new drives via API — must reuse existing user/group drives. Google 'My Drive' and Shared Drives map to OneDrive personal drives and SharePoint document libraries respectively, but mapping is admin-configured. |
| `kind` | `driveType` | Partial | Google's drive (personal) vs shared drive distinguished by 'kind'; OneDrive distinguishes personal/business/documentLibrary. |

### User → User

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `permissionId` | no equivalent | Lossy | Microsoft Graph identifies users by id (Azure AD object ID) or userPrincipalName — Google permissionId is opaque. |
| `emailAddress` | `userPrincipalName` | Full | Email is the join key — both organizations must share or federate identities. |
| `displayName` | `displayName` | Full |  |

### Folder → Folder

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `name` | `name` | Full |  |
| `parents` | `parentReference.id` | Full |  |
| `createdTime` | no equivalent | Dropped | Graph API sets createdDateTime at creation — cannot override on personal OneDrive. |

### File → File

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `name` | `name` | Full |  |
| `mimeType` | `file.mimeType` | Partial | Google Docs/Sheets/Slides (application/vnd.google-apps.*) have no native OneDrive equivalent — must be exported to Office formats first. |
| `size` | no equivalent | Internal | Used to choose between simple PUT (<4MB) and upload-session (≥4MB). |
| `parents` | `parentReference.id` | Full |  |
| `modifiedTime` | `lastModifiedDateTime` | Partial | Graph API allows setting lastModifiedDateTime via PATCH after upload, but personal OneDrive may overwrite. |
| `owners` | `createdBy.user` | Workaround | Cannot impersonate creator on personal OneDrive. For SharePoint, app-only auth with Sites.FullControl.All can set createdBy via the column 'CreatedBy'. |

### Comment → Comment

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `content` | `body.content` | Workaround | Comments only supported on Office-format files in OneDrive/SharePoint. Comments on PDFs / Google-only formats cannot be migrated and should be exported as plain-text annotation files instead. |
| `author.emailAddress` | no equivalent | Workaround | Comment author cannot be impersonated — author name prepended to comment text. |

### Permission → Permission

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `emailAddress` | `grantedToIdentities[0].user.email` | Full |  |
| `role` | `roles` | Partial | Drive roles (owner/writer/commenter/reader) → Graph roles (read/write). 'commenter' has no direct equivalent — flatten to 'read'. |
| `type` | no equivalent | Lossy | Drive permission types (user/group/domain/anyone) don't all map cleanly to Graph identity types. |

### Revision → Version

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `id` | no equivalent | Internal | OneDrive auto-versions every upload. Migrating historical revisions requires sequential uploads of each revision — typically only the latest revision is migrated. |
| `modifiedTime` | no equivalent | Dropped | Cannot set per-version timestamps on OneDrive — version history reflects upload time. |

### Shortcut → SharedLink

| Google Drive field | OneDrive field | Coverage | Notes |
|---|---|---|---|
| `shortcutDetails.targetId` | no equivalent | Workaround | OneDrive has no native 'shortcut to a file' object. Closest workaround: create a SharedLink to the target file and store the link in a sidecar .url file in the shortcut's location. |

## FAQ

**Do Google Docs convert to Word when migrating to OneDrive?**

Yes. application/vnd.google-apps.* files have no native OneDrive type, so Docs, Sheets and Slides are exported to .docx, .xlsx and .pptx during the run.

**Are Google Drive comments migrated to OneDrive?**

Only on Office-format files — OneDrive and SharePoint do not support comments on PDFs or on Google-only formats. Where a comment cannot be written, it is exported as a plain-text annotation file rather than discarded.

**Can file owners and created dates be preserved in OneDrive?**

Not on a personal OneDrive: Microsoft Graph sets createdDateTime at creation and will not accept an override, and the creator cannot be impersonated. On SharePoint, app-only auth with Sites.FullControl.All can set CreatedBy.

---

Start a migration: https://app.migratly.dev/
