Jump to content

Office 365 Oauth - Bad Request


Recommended Posts

A couple of days ago Microsoft black POP for me, so I installed RC1.  I configured per the instructions provided (included Azure app setup and secret setup), but continue to get this error:  The Mail Import test failed: Bad Request

I have restored from backup and re-ran the update to RC1 process.  Still no joy.

DOES ANYONE HAVE MICROSOFT OATH2 WORKING YET?

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi @productiveit,

You may continue to use password auth to access the mailbox via POP by following the one-time re-enablement instructions at https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437

With regards to your report, a "Bad Request" error could indicate that the Redirect URI specified in the App Registration doesn't match the one generated by your WHMCS installation during the connection attempt.

Please ensure that your WHMCS installation's Friendly URL mode is set to Full Friendly Rewrite (Configuration > System Settings > General Settings > General Tab).

Then please create a new App Registration in the Azure Portal using the Full Friendly Redirect URL: https://help.whmcs.com/m/system/l/1600738-setting-up-microsoft-as-your-mail-service-provider

 

Link to comment
Share on other sites

  • WHMCS Support Manager
On 10/14/2022 at 6:22 PM, productiveit said:

Of note, the Redirect URL provided to me from WHMCS is not a working page:  https://support.productiveit.com/admin/setup/support/oauth2/callback  

That URL doesn't look quite right. Please follow these steps to re-synchronise  your .htaccess file: https://help.whmcs.com/m/troubleshooting/l/1007451-troubleshooting-a-404-page-not-found-error#updating-the-htaccess-file

 

The Redirect URL value displayed in the Microsoft Mail Provider field should then be https://support.productiveit.com/admin/setup/mail/oauth2/callback

 

Please then update your App registration in the Azure portal with the new URL into the Web Redirect URI field, eg:

Screenshot 2022-10-17 at 10.09.36.png

 

With your permission I'd like to keep this thread available, as these troubleshooting steps will undoubtedly  be helpful should other users encounter the same issue in future.

Link to comment
Share on other sites

I'll reply in this then.

But for me it had nothing to do with redirect URL, i got mine to verify fine and have gotten the connection token.
And in the test connection i get a success with no errors.

I'm just not getting any tickets in, and when debugging the pop cron, it just reports "bed request" nothing else.

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi @networkmedia,

Thanks for sharing that information.

That URL doesn't look quite right, I see admin in the Redirect URI twice.

Please follow these steps to select the Full Friendly URLs mode and re-synchronise  your .htaccess file: https://help.whmcs.com/m/troubleshooting/l/1007451-troubleshooting-a-404-page-not-found-error#updating-the-htaccess-file .

The Redirect URI should be:

https://login.networkmedia.dk/admin/setup/support/oauth2/callback

 

Please then update your App registration in the Azure portal with the correct URL into the Web Redirect URI field.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated