Create a new Outlook Data File, make it the default data location, restart Outlook, and then remove and re-add Gmail; Outlook blocks removal because Gmail is currently the profile’s only account.
Replace the only Gmail account
- Preserve any Outlook-only information first.
- Gmail configured through IMAP normally uses an
.ost file that synchronizes with the server, so that file itself does not require backup.
- If Outlook contains local-only folders, contacts, or calendar items, export them first through File > Open & Export > Import/Export > Export to a file > Outlook Data File (.pst).
- Create another data location.
- In Outlook, select New Items > More Items > Outlook Data File.
- Enter a file name and select OK. Outlook normally saves the
.pst under Documents\Outlook Files.^1^
- Make that new file the default.
- Select File > Account Settings > Account Settings.
- Open the Data Files tab.
- Select the new
.pst, choose Set as Default, and accept the prompt.
- Close and restart Outlook so the change takes effect.
- Remove Gmail.
- Return to File > Account Settings > Account Settings > Email.
- Select Gmail, choose Remove, and confirm.
The warning you encountered is expected when attempting to remove the last account before creating another data location.^2^
- Add Gmail again.
- Select File > Add Account.
- Enter the Gmail address and select Connect.
- Complete Google’s browser sign-in.
- On the Google permissions page, allow Microsoft apps & services to read, compose, send, and delete Gmail messages.
- Select Done, then test both sending and receiving.
Cleaner fallback: create a replacement profile
If Outlook still refuses to release the account, leave the existing profile intact initially and create a new one:
- Close Outlook.
- In Windows Search, enter
outlook.exe /manageprofiles and press Enter.
- Select Show Profiles > Add.
- Name the profile and add the Gmail account.
- Set Always use this profile to the new profile, or choose the option that prompts for a profile.
- Start Outlook and verify that Gmail sends and receives correctly.
- Only after confirming that required data is available, return to Show Profiles, select the old profile, and choose Remove.
Deleting a profile removes its configured accounts and offline data, but associated .pst files remain on the computer.^3^
If Gmail still cannot connect
Use this only if re-adding Gmail produces an IMAP, authentication, or synchronization error:
- Close Outlook.
- In the Google account’s Security settings, open Your connections to third-party apps & services > Microsoft apps & services.
- Choose See details > Remove all access > Confirm.
- Open Windows Credential Manager > Windows Credentials.
- Under Generic Credentials, expand entries beginning with
MicrosoftOffice16_Data:OAUTH2.
- Remove the two entries for the affected account whose full names include
tp_google_imap_Oauth2.
- Reopen Outlook and complete Sign in via browser, ensuring the Gmail-access permission is selected.
Microsoft documents this authorization and credential reset for Gmail sign-in and synchronization failures in classic Outlook.^4^
References
- Create an Outlook Data File (.pst) to save your information
- Remove or delete an email account from classic Outlook for Windows | Microsoft Support
- Remove a profile in classic Outlook | Microsoft Support
- Unable to add a Gmail account to classic Outlook | Microsoft Support