Pages

Friday, June 19, 2026

Fixing Codex App and ChatGPT Authentication Error: Why Setting Microsoft Edge as the Default Browser Solved My SSO Login Problem

 

Fixing Codex App and ChatGPT Authentication Error: Why Setting Microsoft Edge as the Default Browser Solved My SSO Login Problem

I recently ran into an authentication problem while trying to use the OpenAI Codex app with my organisation account. The issue was confusing because the login worked in Microsoft Edge, but failed when Chrome was used.

The error message shown was:


Authentication Error
Email does not match organization's SSO configuration.

error_code: sso_mismatch_user_creation

At first, this looked like an organisation-level SSO configuration issue. However, after testing the login flow in different browsers, the pattern became clearer: Chrome was causing the problem, while Edge successfully brought me to the correct Microsoft Authenticator page.


The Problem

When launching the Codex app and trying to authenticate with my ChatGPT Edu / organisation account, the login flow appeared to depend on the browser that opened automatically.

In my case:

Chrome as default browser → Authentication error
Edge as default browser → Correct Microsoft Authenticator flow

This suggested that Codex was not the direct source of the problem. Instead, the issue seemed to come from the browser used during authentication.

Chrome may have been holding on to the wrong cached identity, the wrong Microsoft tenant session, or a personal/work account mismatch. This resulted in the SSO flow returning an email identity that did not match the organisation’s expected ChatGPT workspace configuration.

Edge, on the other hand, worked properly. It opened the correct Microsoft work/school authentication flow and brought me to Microsoft Authenticator as expected.

Why This Happens

Many desktop apps do not handle the full login process internally. Instead, when you click “Sign in,” they launch your default system browser to complete authentication.

This is usually convenient, but it can create problems in a managed organisation environment.

If your default browser is Chrome, and Chrome has:

- a personal Microsoft account signed in
- old OpenAI or ChatGPT cookies
- an outdated Microsoft login session
- multiple profiles
- blocked cookies or privacy extensions
- a different work/school account cached

then the app may be redirected into the wrong authentication state.

For normal personal accounts, this may not matter much. But for organisation SSO, especially with Microsoft Entra ID / Azure AD, the email and tenant identity must match exactly. If Chrome presents the wrong identity, the SSO flow fails.

That is likely why the error appeared:

sso_mismatch_user_creation

The Solution

The practical fix was simple:

Set Microsoft Edge as the default browser before launching the Codex app.

Once Edge became the default browser, the Codex app launched the authentication flow through Edge instead of Chrome. Edge then brought me to the correct Microsoft Authenticator page, and the login succeeded.

Step-by-Step Fix on Windows

Here is what worked for me.

Step 1: Close the Codex App

First, close the Codex app fully.

If needed, check the system tray or Task Manager to make sure it is not still running in the background.

Step 2: Set Microsoft Edge as the Default Browser

On Windows:

Start → Settings → Apps → Default apps

Then search for:

Microsoft Edge

Select Microsoft Edge, then click:

Set default

This makes Edge the browser that Windows will use when an app opens a web login link.

Step 3: Open Edge and Confirm the Correct Work Account

Before launching Codex again, open Microsoft Edge manually.

Make sure Edge is signed in with the correct work or school account, especially the account associated with the organisation’s ChatGPT Edu workspace.

If there are multiple Microsoft accounts in Edge, make sure the correct one is active.

Step 4: Launch Codex Again

Now reopen the Codex app.

Click the option to sign in with ChatGPT.

This time, Codex should launch the login flow in Edge. In my case, this brought me to the correct Microsoft Authenticator page instead of producing the SSO mismatch error.

Step 5: Complete Microsoft Authenticator Verification

Approve the sign-in using Microsoft Authenticator.


After that, the Codex app should complete authentication and become usable.


Why This Fix Is Better Than Clearing Everything

One possible fix is to clear cookies and site data in Chrome. However, this can be disruptive because it may sign you out of many sites, including Microsoft 365, Gmail, ChatGPT, and other services.

Changing the default browser to Edge is a cleaner workaround because it does not require deleting Chrome data. It simply forces the Codex authentication flow to use the browser that already handles the organisation’s Microsoft login correctly.

For managed work devices, this may also be more reliable because Edge is often better integrated with Microsoft work/school authentication policies.

Can I Switch Back to Chrome After Login?

Possibly, but it depends on how long the Codex authentication session remains valid.

After Codex has successfully authenticated, you may be able to switch your default browser back to Chrome. However, if Codex later needs to re-authenticate, the same Chrome-based error may return.

For reliability, I would keep Edge as the default browser when setting up or re-authenticating Codex.

Summary

The problem was not necessarily that the organisation SSO was broken. The key clue was that Edge worked while Chrome failed.

The likely issue was that Codex launched the authentication flow using the system default browser, and Chrome was sending the wrong cached identity or Microsoft account state.

The fix was:

Set Microsoft Edge as the default browser → Launch Codex → Sign in again → Complete Microsoft Authenticator

This allowed the Codex app to authenticate correctly using the organisation’s Microsoft SSO flow.



For users in managed environments, especially those using ChatGPT Edu, Microsoft work/school accounts, or organisation SSO, this is a useful workaround to try before assuming that the whole SSO configuration is broken.

No comments:

Post a Comment