logo
search
Microsoft 365 Error Codes

How to Fix AADSTS20012 Error Adding Exchange to iPhone

Rana GarciaRana Garcia Oct 10, 2026 869 views

Question details

The user needs to resolve an authentication error preventing them from successfully adding a Microsoft Exchange account to their iOS device.

How to Fix AADSTS20012 Error Adding Exchange to iPhone
Product
Outlook for iOS / Microsoft Exchange
Device & OS
iOS
Scenario
Setting up a corporate Exchange email account on an iPhone using WS-Federation sign-in.
Observed behavior
The sign-in message is rejected as invalid, malformed, or potentially dangerous, triggering the AADSTS20012 error code and halting the account setup process.
Before you start

Before reaching out to support, take a screenshot of the error screen so you have the exact request ID, correlation ID, and timestamp readily available.

Solution 1Recommended

Contact In-App Support for Outlook on iOS

Reach out directly to the Outlook for iOS support team using the built-in help feature to report and resolve federation sign-in issues.

Since this specific error involves how Outlook handles WS-Federation messages during setup, the dedicated in-app support team is best equipped to investigate the backend logs.

1
Access your profile

Open the Outlook for iOS app and tap your profile photo located in the upper-left corner of the screen.

2
Navigate to Help & Feedback

Select the question-mark icon at the bottom of the side menu to open the Help & Feedback section.

3
Contact Support

Tap on 'Contact Support' and describe the issue. Be sure to provide the request ID, correlation ID, timestamp, tenant information, and the full AADSTS20012 error message.

Provide Accurate Details: Providing the exact correlation ID and timestamp is crucial, as it allows Microsoft engineers to locate your specific failed sign-in attempt in their server logs.
Free Microsoft Office alternative

Manage Your Documents Seamlessly with WPS Office

While you wait for your Exchange email access to be restored, you can rely on WPS Office to view, edit, and manage your important documents. It is a highly compatible, feature-rich, and free alternative to Microsoft Office that works perfectly on your iPhone.

  1. 1. Install the App: Download WPS Office for free from the Apple App Store.
  2. 2. Access Your Files: Open the app and link your preferred cloud storage (like iCloud, Google Drive, or Dropbox) to access your documents.
  3. 3. Edit Without Limitations: Tap on any Word, Excel, or PowerPoint file to start editing immediately with a familiar, user-friendly interface.
Free, lightweight, and fully optimized for mobile productivityExcellent compatibility with Microsoft Word, Excel, and PowerPoint formatsEasily edit or review document attachments you have saved on your deviceCross-platform support ensures your files are synced across iOS, Mac, Windows, and Android
microsoft office alternative - wps office

Frequently Asked Questions

What does the AADSTS20012 error code mean?

This error code signifies that a WS-Federation sign-in message was rejected during authentication because it was invalid, malformed, or flagged as potentially dangerous by the server.

Where can I find the correlation ID and timestamp?

These diagnostic details are usually displayed directly on the screen when the AADSTS20012 error occurs. Taking a screenshot of this page is the easiest way to record them.

Can I fix the WS-Federation configuration myself?

No. Federation and sign-in configurations are managed at the organizational level. You will need to contact your company's Exchange or Identity Administrator to resolve backend misconfigurations.