Bad Request Error Importing Microsoft® Email
WHMCS fails to import emails using a Microsoft email service (for example, Microsoft Outlook® or Microsoft 365®).
Additionally, admins with the System email permission receive a POP3 Connection Error email with the following error detail:
The Redirect URI that you specified during app registration in the Microsoft Azure® Portal is invalid. It does not resolve to the callback handler file in your WHMCS installation.
This may be due to one of several causes:
- The System URL setting in WHMCS begins with
- You have misconfigured WHMCS's Friendly URL settings.
- The WHMCS installation URL changed after you registered the app.
To resolve this issue:
- Make certain that you have installed a valid SSL certificate on your website.
- In the WHMCS Admin Area, go to the General tab at Configuration > System Settings > General Settings.
- Update the WHMCS System URL setting to begin with
- Click Save Changes.
- Re-synchronise your
.htaccessfile and confirm that Full Friendly Rewrite mode operates correctly. For more information, see Updating the .htaccess file.
- Edit the support department at the Configuration > System Settings > Support Departments.
- Under Mail Importing Configuration, copy the new Redirect URL value.
- Update your app registration in the Microsoft Azure Portal to use the new redirect URL. For more information, see Create Your Microsoft Azure Application.
The Redirect URL must use the following format, where
example.com is your website and
whmcs is the directory that stores WHMCS's files: