How to Fix AADSTS20012 Error Adding Exchange to iPhone
Question details
The user needs to resolve an authentication error preventing them from successfully adding a Microsoft Exchange account to their iOS device.

- 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 reaching out to support, take a screenshot of the error screen so you have the exact request ID, correlation ID, and timestamp readily available.
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.
Open the Outlook for iOS app and tap your profile photo located in the upper-left corner of the screen.
Select the question-mark icon at the bottom of the side menu to open the Help & Feedback section.
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.
Involve Your Organization's IT Administrator
If the issue stems from the organization's backend configuration, an IT or Exchange administrator must review the identity federation settings.
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. Install the App: Download WPS Office for free from the Apple App Store.
- 2. Access Your Files: Open the app and link your preferred cloud storage (like iCloud, Google Drive, or Dropbox) to access your documents.
- 3. Edit Without Limitations: Tap on any Word, Excel, or PowerPoint file to start editing immediately with a familiar, user-friendly interface.

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.




