How to Fix SharePoint Add-In AADSTS50011 Redirect URI Errors
Question details
Users need to resolve an authentication error preventing access to SharePoint-hosted add-ins across multiple tenants.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Accessing or authenticating a SharePoint-hosted add-in, often after a tenant rename.
- Observed behavior
- The system throws an AADSTS50011 error, indicating that the redirect URI provided in the request does not match the configured reply URLs for the application.
Ensure you have Azure Active Directory administrative privileges and the necessary Azure AD PowerShell module installed on your system before attempting to modify service principal configurations.
Update the SharePoint Online Service Principal via PowerShell
Use a Microsoft-provided PowerShell script to append a wildcard reply URL to the SharePoint Online service principal, resolving the redirect mismatch.
This solution involves modifying the Azure AD configuration for the built-in SharePoint Online service principal (Application ID: 00000003-0000-0ff1-ce00-000000000000). Adding a wildcard URL ensures dynamic SharePoint add-in requests are properly authenticated.
Open PowerShell as an administrator and run the command to connect to your Azure Active Directory environment using an admin account.
Run a PowerShell query to fetch the SharePoint Online service principal using the specific Application ID '00000003-0000-0ff1-ce00-000000000000'.
Append 'https://*.sharepoint.com/_forms/*' to the list of allowed reply URLs (Redirect URIs) within the service principal object.
Execute the update command to apply the new reply URL configuration to Azure AD. Allow a few minutes for the changes to propagate across your tenant.
Looking for a Hassle-Free Office Suite? Try WPS Office
Troubleshooting Azure AD and Microsoft 365 tenant errors like AADSTS50011 can be highly technical and time-consuming. If you want a straightforward, lightweight, and completely free productivity suite for your daily document tasks, WPS Office is the perfect alternative. It requires no complex server configurations while maintaining full compatibility with your existing files.
- 1. Download the Installer: Visit the official WPS website and click the free download button for your operating system.
- 2. Install WPS Office: Run the lightweight installer and follow the on-screen instructions to set up the software.
- 3. Open and Edit Files: Launch WPS Office to immediately start opening, creating, and editing your Microsoft Office documents without complex sign-in requirements.

Frequently Asked Questions
What exactly causes the AADSTS50011 error in SharePoint?
This error occurs when the redirect URI sent by the application during authentication does not match any of the reply URLs registered for that application in Azure Active Directory.
How do I undo the PowerShell reply URL change if it causes unexpected issues?
To reverse the change, run PowerShell to retrieve the SharePoint Online service principal, remove the 'https://*.sharepoint.com/_forms/*' entry from the reply URLs list, and execute the update command.
Can renaming a SharePoint tenant cause the AADSTS50011 error?
Yes. Renaming a tenant changes the base URLs of your SharePoint sites. If the corresponding Azure AD service principal reply URLs are not updated to reflect the new domain, authentication requests will fail with this redirect URI mismatch error.




