Skip to main content
Prism MigrationPrism Migration
Cloud Migration

How to Migrate Outlook PST to Gmail and Google Workspace with OAuth 2.0

P
Prism Migration Cloud Systems Team Author

Principal Google Workspace Migration Engineer

8 min read · Published August 16, 2026
Executive Summary & Key Takeaway

Bypass Google GWMMO crashes and 'Less Secure Apps' blocks. Here is how to import PST files to Gmail and Google Workspace using modern OAuth 2.0.

On This Page (8 sections) ▾
✦Tip

⚡ Quick Direct Answer: How to Import PST into Gmail Safely

Google disabled "Less Secure Apps" and requires OAuth 2.0 PKCE authentication for all third-party email connections.

  1. Google Workspace Migration Tool (GWMMO): For Google Workspace users, download Google Workspace Migration for Microsoft Outlook (GWMMO), log in via browser, and select your .pst file.
  2. Desktop IMAP Sync (Free Gmail): Add your Gmail account to Outlook using Google App Password or OAuth. Drag and drop PST folders into your Gmail inbox tree.
  3. Direct Ingestion via Standalone Tool: Use the Prism PST Converter Tool (Free scan and preview; full export requires a license) with OAuth 2.0 authentication to upload PST archives directly to Gmail labels without requiring Outlook installed.

Moving legacy Windows Outlook .pst files into Google Workspace or consumer Gmail accounts requires modern authentication since Google deprecated "Less Secure Apps" and Basic Authentication.

Google’s native migration tool—Google Workspace Migration for Microsoft Outlook (GWMMO)—has specific operational boundaries:

  • It can encounter memory pressure or MAPI communication timeouts on very large archives (>20 GB).
  • It requires an active installation of Microsoft Outlook on the Windows workstation.
  • Corporate Multi-Factor Authentication (MFA), FIDO2 security keys, and hardware tokens require browser-based OAuth 2.0 flows.
CODE / SCRIPTCode / Script
┌────────────────────────────────────────────────────────┐
│  GWMMO MAPI ROUTE VS DIRECT OAUTH 2.0 INGESTION        │
├────────────────────────────────────────────────────────┤
│  ❌ GOOGLE GWMMO:                                      │
│     Requires Installed Outlook -> MAPI Subsystem       │
│     -> Subject to local DLL and bitness constraints    │
│                                                        │
│  🟢 DIRECT OAUTH 2.0 MIGRATION:                        │
│     Standalone File Parser -> OAuth 2.0 Browser        │
│     -> Ingests archive folders to Gmail labels         │
└────────────────────────────────────────────────────────┘

When managing large migration workflows, having a direct pipeline that bypasses local MAPI dependencies ensures consistent execution.


Technical Deep-Dive: OAuth 2.0 PKCE vs. Legacy Basic Authentication

Understanding how Google protects user accounts explains why old tools fail:

1. The Death of Basic Authentication & App Passwords

Legacy mail utilities relied on IMAP Basic Authentication (username + password) sent over SSL. Google deprecated Basic Auth completely in favor of OAuth 2.0. While consumer Gmail still supports 16-character App Passwords, Google Workspace enterprise domains with 2-Step Verification enforced frequently block App Passwords under administrative policy.

2. OAuth 2.0 with PKCE (Proof Key for Code Exchange)

Modern desktop tools implement RFC 7636 (PKCE) to prevent authorization code interception:

  1. The client generates a high-entropy cryptographic random string called code_verifier.
  2. It hashes the verifier using SHA-256 to create a code_challenge.
  3. The desktop app launches your default system browser (Chrome, Edge, Safari) pointing to https://accounts.google.com/o/oauth2/v2/auth.
  4. You log in securely with full support for hardware security keys, Google Authenticator, or passkeys.
  5. Google redirects back to a local loopback server (http://127.0.0.1:port/oauth2callback) with an authorization code.
  6. The app exchanges this code alongside the code_verifier for ephemeral access tokens (ya29...) and refresh tokens.
CODE / SCRIPTCode / Script
+---------------------------------------------------------------+
|                 OAUTH 2.0 PKCE BROWSER FLOW                   |
|                                                               |
| [Prism Client]                                [Google Auth]   |
|   | -- Generate code_verifier & challenge -->       |         |
|   | -- Open Browser: accounts.google.com ---->      |         |
|   |                                                 | (User logs in + MFA)
|   | <-- Local Loopback Redirect (auth_code) --------|         |
|   | -- Token Exchange (auth_code + verifier) -----> |         |
|   | <-- Secure Access Token (Bearer ya29...) ------ |         |
+---------------------------------------------------------------+

Your master Google credentials are never entered into, cached by, or transmitted through the migration software.


The 3 Technical Roadblocks in Traditional PST to Gmail Migrations

  1. OAuth 2.0 Scopes & MFA Enforcements: Old scripts running on standard IMAP/SMTP port 993 get flagged and dropped by Google's security gates immediately unless they use interactive OAuth 2.0 tokens.
  2. Google API Quota Units & Rate Limiting: The Gmail API meters usage in abstract Quota Units (QU), with different methods consuming varying amounts of quota (for example, messages.insert and messages.import incur method-specific unit costs). Quota limits are established at both project and per-user levels and can vary based on project creation date, tier, and whether an account is Google Workspace or consumer Gmail. Usage and current thresholds should be inspected directly in the Google Cloud Console Quotas & System Limits page. Quotas define rate boundaries rather than guaranteed migration throughput; robust migration workflows must handle HTTP 429 rate limit responses with standard truncated exponential backoff.
  3. MAPI Dependency Lock: Legacy utilities don't parse PST files directly; they lean entirely on Outlook's OLMAPI32.DLL. Corrupt that DLL or mismatch 32-bit vs 64-bit architecture, and the migration dies right there.

Method 1: Migrating via Google Workspace Admin Console (Cloud Route)

Google Workspace Super Admins dealing with active cloud transitions have a native path available.

Open Google Workspace Admin Console (admin.google.com) and dive straight into Account > Data Migration > Set up data migration.

Pick Microsoft Exchange or Microsoft 365 as your source, then lock the Connection Protocol to Exchange Web Services (EWS).

Map user identities via a quick CSV before kicking anything off:

CODE / SCRIPTCSV
SourceUser,TargetUser
john.doe@exchange.corp,john.doe@company.com
sarah.jenkins@exchange.corp,sarah.jenkins@company.com
⚠Warning

Google's cloud migration engine does NOT accept direct PST file uploads. It only slurps data from live online Exchange servers. Dead server and only offline PST archives left? This path won't work.


Method 2: Standalone Migration via Prism PST Converter

Bypassing Microsoft Outlook entirely means deploying the Prism PST Converter Tool (Free scan and preview; full export requires a license) for direct offline ingestion.

This architecture reads PST binary trees straight from disk, translates nested folders into Gmail labels, and streams mail packets directly into Google's servers via authenticated Google OAuth 2.0 tokens.

CODE / SCRIPTCode / Script
┌────────────────────────────────────────────────────────┐
│  PRISM DIRECT OAUTH 2.0 GMAIL MIGRATION WORKFLOW       │
├────────────────────────────────────────────────────────┤
│  [Local Workstation: 50GB Archive.pst]                 │
│             │                                          │
│             ▼ Direct Local MAPI Byte Parser            │
│  [Prism Direct OAuth 2.0 Migration Engine]             │
│             │                                          │
│             ▼ TLS 1.3 Authenticated Ephemeral Stream   │
│  [Google Workspace Mailbox: Labels, Contacts, Calendar]│
└────────────────────────────────────────────────────────┘
  1. Launch the software on Windows or macOS.
  2. Add your PST files into the workspace by clicking Add PST File or letting the app auto-detect your Outlook profiles.
  3. Authenticate securely through the browser popup window that appears when clicking Authenticate with Google.
  4. Check the options to preserve folder hierarchies as Gmail labels and skip duplicate items.
  5. Click Convert / Export to begin migrating your archive directly into Gmail.

Key Technical Advantages:

Technical FeatureGoogle GWMMOBasic IMAP Drag-and-DropPrism Outlook to Gmail Migrator
Outlook Required?Yes (Mandatory)Yes (Mandatory)No (Standalone)
50 GB+ PST SupportCrashes frequentlyFreezes UIDesigned for 50 GB+ Archives
AuthenticationLegacy Browser HookApp PasswordsModern OAuth 2.0 / Service Account
Folder-to-Label MappingFlat hierarchyManualPreserves Nested Label Trees
Rate Limit HandlingFails on HTTP 429DisconnectsExponential Backoff Handling
DeduplicationNoCreates duplicatesBit-Level Deduplication

Handling Rate Limits: Exponential Backoff and Jitter

When streaming tens of thousands of emails into Google's REST API, HTTP 429 Too Many Requests responses are normal. Flawed migration scripts crash or stall when encountering rate limits.

The Prism ingestion engine implements full exponential backoff with randomized jitter algorithms:

CODE / SCRIPTCode / Script
Retry Wait Calculation:
Wait_Time = Min(Max_Backoff, (Base_Interval * 2 ^ RetryCount) + Random_Jitter)

If Google responds with 429, the engine automatically slows thread concurrency, pauses with randomized backoff, and retries the request according to standard API retry guidance without dropping queue items.


3 Pro-Tips for Zero-Downtime Gmail Migrations

  1. Map Subfolders to Gmail Nested Labels: Outlook relies on rigid physical containers like Inbox\Projects\2025, whereas Gmail uses dynamic labels like Inbox/Projects/2025. The engine maps these trees automatically.
  2. Migrate Contacts and Calendars First: Toggle on contacts and calendar syncing before the main email push so your address book is ready on day one.
  3. Use Date Range Filters for Large Inboxes: Split massive historical archives by running recent mail first so users can work immediately, saving older multi-year data for overnight processing.

Frequently Asked Questions

Can I migrate password-protected PST files into Gmail?

Standard PST files with default compressible encryption can be opened and parsed directly by the migration engine on legitimate user-owned archives. If an archive uses high encryption or third-party protection, you will need to provide the credentials or remove protection prior to migration.

Will my emails show up in Gmail with the correct original timestamps?

Yes. The script injects original RFC 822 Date: headers and MAPI PR_MESSAGE_DELIVERY_TIME properties into Google's internalDate attributes so messages retain their chronological order.

Can I run this migration tool on macOS?

Yes. The tool runs on macOS and Windows, processing standalone PST files without requiring Microsoft Outlook to be installed.

How are attachments larger than 25MB handled during migration?

Google rejects incoming messages larger than 25MB. The Prism engine isolates oversized items into a dedicated local extraction folder and creates a reference log so no attachment is ever lost.

Can I pause and resume a long PST to Gmail migration?

Yes. Thanks to transaction logging, if your internet connection drops or you pause the job, clicking Resume skips already uploaded items and continues from the exact message index.


Summary & Next Steps

Migrating Outlook PST archives into Gmail or Google Workspace no longer requires dealing with broken MAPI DLLs or failed basic logins.

  • For standalone, OAuth 2.0-certified migration from PST to Gmail, download the Prism PST Converter Tool (Free scan and preview; full export requires a license).
  • Looking to export your Gmail archive back to PST for cold backup? Check out the Prism Gmail Backup Tool.

Related Guides: Need to migrate across an entire enterprise domain? Read How to Migrate PST Archives to Google Workspace Domain-Wide. For Apple Mail users moving to Gmail, check out How to Import Apple Mail to Gmail.

Recommended Automated Utility Windows 11 & 10 (32 & 64-bit) & macOS

PST Converter Tool

Export Outlook PST files to multiple formats — PDF, MBOX, EML, Gmail, Office 365, IMAP — without needing Microsoft Outlook installed. Handles large 50GB+ files smoothly. Fast on Windows 11 and Mac (M1–M4).

Windows 11 & 10 (32 & 64-bit) & macOS 1, 2 & 3-Year License Options Free Trial (50 items/folder)