logo
search
Outlook Login Problems

How to Fix Gmail Account Setup and Authentication Errors in Outlook 365

Anum MushtaqAnum Mushtaq Oct 19, 2026 869 views

Question details

Users are unable to add a Gmail account to Outlook 365 due to persistent authentication, JavaScript, or profile errors, even when IMAP is enabled and test emails are successfully delivered.

How to Fix Gmail Account Setup and Authentication Errors in Outlook 365
Product
Outlook 365
Device & OS
Windows
Scenario
Adding or configuring a Gmail account in the Outlook 365 desktop client.
Observed behavior
Outlook fails to complete the account setup. It may skip the password prompt, display a JavaScript error, or fail to add the account despite successfully sending a test message.
Before you start

Before proceeding with registry edits or profile resets, ensure you have backed up your Windows registry to prevent accidental system changes, and verify that your Outlook application is fully updated.

Solution 1Recommended

Clear Outdated Windows Credentials and Identity Registry Keys

Removing old cached credentials and identities forces Outlook to launch the modern Google sign-in window for a fresh authentication session.

Often, Outlook stores outdated login tokens that prevent the standard Gmail password prompt from appearing. Clearing these from both the Windows Credential Manager and the Registry resolves the issue.

1
Clear Windows Credential Manager

Open the Windows Start menu, search for 'Credential Manager', and open it. Under 'Windows Credentials', locate any items referencing MicrosoftOffice16 or your Gmail address and click 'Remove'.

2
Open the Registry Editor

Press Windows + R to open the Run dialog, type 'regedit', and press Enter. Grant administrator permissions if prompted.

3
Navigate to the Identities Key

In the Registry Editor address bar, paste or navigate to: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity\Identities

4
Delete the Problematic Identity

Click through the subkeys under 'Identities' on the left side. Look at the right panel to find the one associated with your Gmail address. Right-click the corresponding folder key on the left and select 'Delete'.

5
Restart Outlook and Add Account

Close the Registry Editor, restart Outlook 365, and attempt to add your Gmail account again. The proper Google sign-in window should now appear.

Clear Outdated Windows Credentials and Identity Registry Keys
Modern Authentication: By clearing these keys, Outlook 365 is forced to use Google's modern OAuth sign-in, which bypassing the need for an App Password.
Free Microsoft Office alternative

Try WPS Office for a Hassle-Free Office Experience

If Outlook configuration bugs and complex registry edits are disrupting your workflow, consider downloading WPS Office. It provides a highly compatible, lightweight, and completely free alternative to Microsoft Office, ensuring you stay productive without wrestling with persistent authentication errors.

  1. 1. Download the Installer: Visit the official WPS website and download the free WPS Office installation file.
  2. 2. Install WPS Office: Run the installer and follow the quick setup wizard to install the software on your device.
  3. 3. Open Your Files Seamlessly: Launch WPS Office to instantly open, edit, and save your existing Office documents with full formatting preserved.
100% compatible with Microsoft Office formats (Word, Excel, PowerPoint)Lightweight software that installs quickly and runs smoothly on all PCsA familiar, intuitive interface that requires zero learning curveBuilt-in PDF editing and AI tools to enhance your daily workflow
microsoft office alternative - wps office

Frequently Asked Questions

Do I need an App Password to add my Gmail account to Outlook 365?

For the most recent versions of Outlook 365, App Passwords are usually not required for IMAP accounts. Outlook natively supports modern OAuth sign-in, which allows you to log in securely through a Google prompt. However, if modern authentication fails, you might need to clear cached registry identities to trigger it.

Why does Outlook successfully send a test message but still fail to add the Gmail account?

This situation indicates that the server connection and port settings are correct, but the local Outlook profile or the Windows identity cache is corrupted. The application connects to Gmail but fails to save the account settings locally. Deleting the specific account registry subkey or creating a completely new Outlook profile usually fixes this.

What should the manual server settings be for Gmail IMAP in Outlook?

Ensure IMAP is enabled in your Gmail web settings. In Outlook, set the Incoming mail (IMAP) server to imap.gmail.com with port 993 and encryption method SSL/TLS. The Outgoing mail (SMTP) server should be smtp.gmail.com with port 465 (SSL/TLS) or port 587 (STARTTLS).