Inbound Email Microsoft OAuth Redirect URI doesn't allow query string

Anyone else run into this?

The docs are outdated. Microsoft must have changed the rules about Redirect URIs since they were written up. RewriteRule now required to get it to work!

When you login to the Azure Portal, do the steps for Microsoft OAuth setup for Inbound Email, and enter the Redirect URI, as shown in the docs,, it shows this error:

Failed to update SuiteCRM application. Error detail: URL may not contain a query string. [V/qPTX0wpr9g0xgdOiR105]

Solution, Suite should auto generate a RewriteRule in .htaccess to convert a Redirect URI such as without the query string, into a URL with the query string Suite requires:

Have you got any solution ?

I propose a solution in this thread, with a link to its github PR: