How to Fix Hybrid Modern Authentication Error 2002 in Exchange Outlook
Question details
Users are unable to complete authentication in Outlook desktop, receiving error code 2002 despite successfully reaching the AD FS page.

- Product
- Microsoft Outlook / Exchange
- Device & OS
- not provided
- Scenario
- Configuring Hybrid Modern Authentication (HMA) for a mixed on-premises Exchange and Exchange Online environment.
- Observed behavior
- Outlook desktop successfully displays the AD FS login page but fails to authenticate the session, throwing error 2002 instead of granting access.
Ensure you have administrative access to both your on-premises Exchange server and the Microsoft 365 Admin Center. Verify that your Active Directory Federation Services (AD FS) endpoints are publicly accessible and that SSL certificates are valid and correctly bound.
Review HMA Configuration and Auth Provider Settings
Check your on-premises Exchange server for misconfigured EvoSTS authentication providers or missing OAuth configuration settings.
Error 2002 typically occurs when the on-premises Exchange server fails to properly validate the OAuth token provided by Exchange Online or AD FS. This usually points to a missing or misconfigured Authentication Provider (EvoSTS) setup in the on-premises environment.
To resolve this, you must ensure the EvoSTS authorization server is correctly registered and that the OAuth token configuration parameters align between the cloud and on-premises environments.
Log in to your on-premises Exchange server as an administrator and launch the Exchange Management Shell.
Run the command `Get-AuthServer` to verify that the EvoSTS authentication server is present, enabled, and correctly configured for your hybrid setup.
Run `Test-OAuthConnectivity -Service EWS -TargetUri <Your_EWS_URL> -Mailbox <Test_Mailbox>` to pinpoint where the authentication handshake is failing.
Open your AD FS Management console and verify that the correct claim rules are in place for Microsoft 365, ensuring tokens are properly passed to your on-premises environment.
Run `iisreset` in the command prompt to clear the cache and enforce the updated authentication policies across all Exchange services.

Switch to WPS Office for a Streamlined Experience
Dealing with complex Exchange setups and Outlook authentication errors can be frustrating. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, providing powerful tools for document creation without the heavy enterprise overhead.
- 1. Download the Installer: Visit the official WPS Office website and click on 'Free Download' to get the installer for your operating system.
- 2. Install the Software: Run the downloaded file and follow the on-screen instructions to complete the fast installation process.
- 3. Start Creating: Open WPS Office and immediately start creating, editing, and sharing your documents with familiar tools.

Frequently Asked Questions
What is Hybrid Modern Authentication (HMA)?
Hybrid Modern Authentication is an identity management framework that allows on-premises Exchange servers to utilize the same advanced OAuth-based authentication methods, such as Multi-Factor Authentication (MFA) and Conditional Access, as Exchange Online.
Why does Outlook reach the AD FS page but still fail with Error 2002?
Reaching the AD FS login page means the client successfully found the federation endpoint. Error 2002 occurs subsequently because the on-premises Exchange server cannot validate the returned OAuth token, usually due to missing AuthServer configurations, mismatched TLS certificates, or outdated EvoSTS attributes.
How do I verify if HMA is currently enabled in my Exchange environment?
You can check the HMA status by running the `Get-OrganizationConfig | Format-Table Name,OAuth*` cmdlet in the Exchange Management Shell. If the `OAuth2ClientProfileEnabled` parameter is set to True, Hybrid Modern Authentication is actively enabled.




