What Is Causing This Error?
The ‘Error: AADSTS50011: The Redirect URI Does Not Match’ error arises when setting up an SMTP plugin with the Outlook mailer on your WordPress site.
This error signals that the redirect URI given in your SMTP plugin’s settings doesn’t correspond to what’s been set up in your Azure application.
We’ll show you how to fix this using WP Mail SMTP as an example.
Resolving the Error – Solution
To fix the ‘AADSTS50011: The Redirect URI Does Not Match’ error, you’ll need to ensure that the redirect link specified in your WP Mail SMTP settings matches the one in your Azure account. Then, you’ll need to recreate your connection with WP Mail SMTP and Outlook mailer from your site.
Start by opening your Azure Portal and heading to the App registrations section.
Once in your application, click on Authentication in the left sidebar.
Next, ensure that the Redirect URIs link is correct and the one provided by your SMTP plugin.
For WP Mail SMTP, you can find the redirect link in your site’s WP Mail SMTP settings. Simply navigate to WP Mail SMTP » Settings and you’ll find the Redirect URI field under the Outlook / 365 section.
In the next step, you would need to reauthenticate WP Mail SMTP with your mailer.
Go to WP Mail SMTP » Settings, scroll to the bottom of the page, and click the Remove Connection button.
Once the page has reloaded, click Allow plugin to send emails using your Microsoft account next.
That’s it! Now you know how to fix the AADSTS50011 error when setting up the Outlook mailer with an SMTP plugin.
If you’d like to learn how to troubleshoot other common errors, check out the following tutorials: