Microsoft OAuth RedirectURL - need to change

Evening, so I have the Bitnami docker version running of SuiteCRM. Runs great no issues. I am trying to add MicorsoftAuth for emails . I have the instance running thru my proxy on crm.website.com. but the redirectauth shows localhost.

I get this error now when trying to authenticate. and cannot change the url in SuiteCRM

AADSTS50011: The redirect URI ‘http://localhost/index.php?entryPoint=setExternalOAuthToken’ specified in the request does not match the redirect URIs configured for the application ‘f08190e8-3ad3-483f-b686-b9cf0e454ca6’. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

  1. What version of Suite is that?
  2. You need to fix the 'site_url' parameter located inside your /config.php. It defaults to 'site_url' => 'http://localhost', change it to your URL 'site_url' => 'https://crm.website.tld', and note, don’t put any trailing slashes on that site URL. Suite uses this site URL setting to construct that OAuth Redirect URI, which should then correctly match the redirect URI configured in your application in the Azure portal, and your Microsoft Auth for emails should then work.

Cheers. Post back, let us know how you get on.

This worked perfectly, Just not getting From and Subject info back raised a new post ?

1 Like

HI, when I change the site_url to https://webitesite Suitecrm gives me a 500 error and it stops working.

When I change it back to HTTP the site works again with SSL. It redirects from HTTP to https ok but this impacts my Azure Oath2 setup.

I get the following error when trying to set up an email.
[FATAL] The specified OAuth2 provider ‘’ is not supported or not properly configured

It seems to because of the redirect. Any help or suggestions would be appreciated.

HI, when I change the site_url to https://webitesite Suitecrm gives me a 500 error and it stops working.

500 error indicates the app crashed in PHP due to some problem. Would you check your Suite error log file to find out exactly what does it say for that PHP fatal 500 internal server error message, and share it back here.

When I change it back to HTTP the site works again with SSL. It redirects from HTTP to https ok but this impacts my Azure Oath2 setup.

Can you check with your server admin in charge of your redirecting http to https. Whether it’s a proxy server doing that redirect, or a simple apache2 Rewrite from http to https, they should explain to you what it’s doing and why it wants http not https.

1 Like

Hi, I made the change to the site_url again and this time I did not get the 500 error. This change fixed the redirect URL which allowed me to create the Auth providers and connections. I was able to get the tokens. I was very happy. Now to set up the emails and test that.

Thanks for responding so quickly.

1 Like

Awesome! @JonWhitt Please click “Solution” on the post which solved your issue, so other users would more easily find the solution to their same issue.

I am new to the forum. Can you please point me to the solution area?

Thanks, David

@daveinthehat Welcome. This forum software gives the original poster (OP), @JonWhitt in this case, the option to see a link labelled “Solution” on all the replies, and when he clicks the “Solution” button under the reply he feels solved his issue, that reply will be highlighted at the top of this page to all future users visiting this post. Presumably, they will have the same issue, so this is a very convenient way of giving the solution right up top to users experiencing the same situation as the original poster.