I am trying to set up user email in BC On-Prem to our microsoft 365 exchange online. We have our URI set as https://oauthlanding. When trying to set up a user and authenticate we get an error message “The redirect URI ‘http://OAuthLanding.htm’ specified in the request does not match the redirect URIs configured for the application”. It is looking for an http rather than https. Why and how do I fix?
Thank you!!!
Hello Larry - I’ll see if I can try to help. First, can you tell me a little bit about the setup you’ve already done? Let’s start with the Azure AD / Entra ID App Registration step (link below). Can you provide a screen shot of the App Registration side of things on Entra? If you look at the image of my test setup below, there are some key things to make sure are configured correctly:
- Supported Account Types should be set to “Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant)”
- Redirect URI - the drop down should be “Single-page application (SPA)”
- (most importantly) the URI should be the address of the web client for your BC on-premises instance (mine in the screenshot is just an example from the documentation link).
Can you share how yours is setup so we can see if it’s correct and then move to the next step as needed?
Microsoft Documentation BC On Prem to O365 Email Setup - App Registration
Hi David. Thank you for replying! I had almost given up. Below is a picture of my Redirect URIs. I have everything set up as you do, EXCEPT, the SPA. I will add it and try.
I figured out the mismatch. Now I’m getting a message “AADSTS90102: ‘redirect_uri’ value must be a valid absolute URI” Ugghhh. Thoughts on how to fix?
Ah yeah, that error usually happens when there’s a mismatch between the redirect URI you’re using in your app and the one that’s registered in Azure AD for the application.
In your case, the error says it’s trying to use http://OAuthLanding.htm, but your app is set up with https://oauthlanding, so it’s expecting https, not http. This mismatch is what’s causing the issue.
Here’s how to fix it:
-
Go to Azure Portal → Azure Active Directory → App registrations → Select your app.
-
Under Authentication, check the list of Redirect URIs.
-
Make sure the exact URI you’re using (including the https:// and the full path like https://oauthlanding/OAuthLanding.htm) is listed there.
-
If http://OAuthLanding.htm is being called somehow, double-check your BC On-Prem setup to ensure the URI you’re passing for authentication starts with https:// and includes the correct domain and path.
Also, ensure your app isn’t hardcoding an old or incorrect URI somewhere. Even a small mismatch (like http vs https, or missing .htm) will trigger this error.
So either:
-
Update your Azure app to include the exact redirect URI that BC is sending, or
-
Update the BC On-Prem config so it sends the correct https redirect URI that matches what’s in Azure.
Once those match perfectly, it should work.