How to Fix SharePoint iOS Error AADSTS50020 Caused by Wrong Tenant
Question details
The user is unable to access the SharePoint iOS app due to error AADSTS50020, which occurs because the app is attempting to authenticate against the wrong organization's Microsoft Entra tenant.

- Product
- Microsoft SharePoint iOS App
- Device & OS
- iOS
- Scenario
- Attempting to sign into a work account on the SharePoint iOS app after previously accessing a shared file as a guest in another organization's environment.
- Observed behavior
- The SharePoint iOS app returns error code AADSTS50020 and blocks access. Clearing only the SharePoint app data fails to remove the saved guest sign-in state.
Ensure you have the correct login credentials for your primary work account and save any pending work in other Microsoft 365 iOS apps before clearing account data.
Clear Account Settings and Microsoft Edge Internals
Perform a comprehensive reset of saved sign-in data across both SharePoint and Microsoft Edge to force the app to authenticate with the correct home tenant.
Because iOS shares authentication states between Microsoft 365 applications, clearing SharePoint's data alone is often insufficient. The wrong tenant might remain selected because Microsoft Edge on iOS has saved a previous guest or B2B sign-in token.
Swipe up from the bottom of your iPhone or iPad screen and swipe away all running Microsoft 365 applications, including SharePoint and Edge, to close them completely.
Open the iOS 'Settings' app, scroll down to find 'SharePoint', tap it, and toggle on the 'Clear Account Settings' option.
Open the Microsoft Edge app, sign out of your profile, type 'edge://signin-internals' into the address bar, and tap 'RemoveAllAccounts'.
Restart your iOS device. Once restarted, open the SharePoint app and sign in again using the correct work account credentials.

Clear OneDrive Account Settings
If you are experiencing similar tenant routing issues across multiple Microsoft apps, clearing OneDrive's account settings can help flush conflicting cached credentials.
Looking for a Seamless Office Alternative? Try WPS Office
If complex tenant authentication issues and login errors in Microsoft 365 are slowing down your mobile workflow, WPS Office offers a straightforward, lightweight alternative. You can view, edit, and manage your documents effortlessly without restrictive account routing issues.
- 1. Download the App: Install WPS Office from the Apple App Store on your iPhone or iPad.
- 2. Open Your Files: Launch WPS Office and directly browse your local device files or connect your preferred third-party cloud storage.
- 3. Edit Without Hassle: Start editing your Word, Excel, or PowerPoint documents immediately without dealing with complex organizational account restrictions.

Frequently Asked Questions
What does error code AADSTS50020 mean?
This error means that the Microsoft Entra identity provider successfully authenticated your account, but you are not authorized to access the requested resource. This typically happens when the app tries to log you into a tenant where you do not exist or lack guest permissions.
Why doesn't clearing the SharePoint app cache fix the tenant error immediately?
On iOS devices, authentication tokens and guest sign-in states are often shared across various Microsoft apps via Microsoft Edge or the Microsoft Authenticator app. Clearing only SharePoint data leaves the cached Business-to-Business (B2B) guest tokens intact in these shared locations.
Can this wrong tenant issue affect other Microsoft 365 apps on iOS?
Yes, other applications like OneDrive and Teams can experience similar tenant routing issues if they latch onto a cached guest account. Clearing account settings for those specific apps in the iOS Settings menu usually resolves the conflict.




