The error is a known issue when adding Gmail to classic Outlook and is usually caused by how Outlook is authorized to access Gmail, not by the IMAP settings themselves.
Use these steps depending on the Outlook build and behavior.
- Confirm Outlook is on a fixed build
- For the “browser or app may not be secure” / IMAP setup error, the fix is in these channels/builds:
- Current Channel: Version 2404 (Build 17531.10000) or later
- Monthly Enterprise Channel: Version 2407 (Build 17727.10000) or later
- In Outlook, go to File > Office Account and check the version/build. If older, update Office and try adding the Gmail account again.
- If Outlook shows a Retry link during Gmail sign-in
- When adding the Gmail account and the error appears, use the Retry link in the error window.
- In the browser sign-in that opens, make sure to check the box:
- “Read, compose, send, and permanently delete all your email from Gmail.” under Microsoft apps & services can access.
- Complete sign-in and let Outlook finish the setup.
- If Retry does not work, use the manual workaround
Step 1: Remove Microsoft Apps & Services access in Google
- Close Outlook.
- Sign in to the Google account at https://www.google.com.
- Select the profile picture > Manage your Google Account.
- Select Security.
- Under Your connections to third-party apps & services, select Microsoft apps & services.
- Find Microsoft apps & services has some access to your Google Account and select See Details.
- Under Access you've given to Microsoft apps & services, select Remove all access.
- Select Confirm.
Step 2: Clear the stored Google IMAP credentials in Windows
- Open Credential Manager from the Start menu (on some systems via Control Panel > Credential Manager).
- Select Windows Credentials.
- Under Generic Credentials, locate entries starting with MicrosoftOffice16_Data:OAUTH2.
- Expand each and hover over the name until the full name shows tp_google_imap_Oauth2; these are the Gmail IMAP credentials.
- Select Remove for each credential with MicrosoftOffice16_Data:OAUTH2 related to Gmail (there are two per Gmail account).
- Close Credential Manager.
Step 3: Add the Gmail account again in classic Outlook
- Start Outlook.
- Add the Gmail account as usual.
- When the browser sign-in opens, sign in to Gmail and this time ensure the permission box is checked for:
- “Read, compose, send, and permanently delete all your email from Gmail.”
- Complete the sign-in; Outlook should now complete the IMAP setup successfully.
- If Outlook never prompts for a password
- When using manual IMAP setup, ensure Require logon using Secure Password Authentication (SPA) is unchecked on the IMAP details page.
- If still failing, create the account from Control Panel > Mail > Email Accounts > New, enter name, Gmail address, and password, and let Outlook complete the modern auth flow.
- If IMAP is disabled in Gmail
- The same IMAP error can occur if IMAP is disabled on the Gmail side for accounts that still expose that setting. Check Google’s guidance at Add Gmail to another email client and ensure IMAP is enabled if that control exists for the account.
Following the fixed builds plus the permission reset (Steps 1–3) resolves this specific IMAP setup error for classic Outlook.
References: