Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Open

Wrong oauth2 provider opens while adding account

ed.o.byrne

I'm trying to add an email account to Thunderbird that (seems to) require Oauth2 authentication, but it keeps opening the wrong provider in the Firefox window that it launches. The email account is a professional G-Suite address, but it always opens login.microsoft.com instead.

I've checked the MX record for the domain and it correctly lists Google servers, and my laptop was able to authenticate to the correct destination just fine. I have used my desktop for work before, which is all handled through Microsoft accounts, so I suspect that there's some kind of locally cached data which is identifying O365 as the provider, but I can't find any relevant settings or documentation from Firefox. I also cannot find any settings or controls for the Oauth provider in Thunderbird in order to force a Google workflow.

I'm trying to add an email account to Thunderbird that (seems to) require Oauth2 authentication, but it keeps opening the wrong provider in the Firefox window that it launches. The email account is a professional G-Suite address, but it always opens login.microsoft.com instead. I've checked the MX record for the domain and it correctly lists Google servers, and my laptop was able to authenticate to the correct destination just fine. I have used my desktop for work before, which is all handled through Microsoft accounts, so I suspect that there's some kind of locally cached data which is identifying O365 as the provider, but I can't find any relevant settings or documentation from Firefox. I also cannot find any settings or controls for the Oauth provider in Thunderbird in order to force a Google workflow.

All Replies (3)

Please list more details. Domain, etc. Does the problem reproduce with Thunderbird started in troubleshoot mode?

The issue occurs in troubleshoot mode as well, and when setting the system default browser to Safari, so the problem is with whatever the Oauth2 lookup consists of. I read in Mozilla documentation that the forward to the provider checks against a database, it wasn't clear whether that was local or not. If there's a specific DNS record type that it uses for that information then I'm happy to check the domain records, but I'm not sharing the domain for privacy reasons.

In case this happens to anyone else, I still don't know why the lookup in the Oauth2 database was producing an incorrect result here but I was able to bypass the initial failure as follows:

- Access Advanced Preferences - Change mailnews.oauth.useExternalBrowser to false - Open the Add Account dialogue - Cancel the initial modal that redirects to login.microsoft.com

At this point Thunderbird rapidly refreshed the Add Account dialogue faster than I could note what it was doing, and I'm not totally certain that it registered my click to cancel the Add after it redirected to Microsoft, I was just trying to back up the process to try something else. Either way, once it flipped between a couple things it had automatically updated to recommend IMAP with the correct Google-based SMTP servers. Clicking through the resulting modal redirected me to Google's Oauth2 provider successfully and I was able to add the account.

If anyone has additional insight about how this Oauth lookup/forwarding process works I would appreciate hearing about it, as I'm not sold on the above as a workable solution. As a reminder, my MacBook Air did not have anything like this problem, the first time I tried to add my account it simply opened Google's Oauth2 redirect in my system default browser (Firefox).

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.