DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Issue configuring oAuth for SMTP Authentication

 11 Replies
 1 Subscribed to this topic
 31 Subscribed to this forum
Sort:
Page 1 of 212 > >>
Author
Messages
Veteran Member
Posts: 1143
Veteran Member

    I'm trying to configure oAuth for Email using the Exchange option.
    After a few config hickups we ended with the problem that apparently DNN send a non https return addres to office 365.
    We do have https redirect in place but ion the end this is the error we get:

    AADSTS50011: The redirect URI 'http://www.website.com/Providers/SmtpOAuthProviders/ExchangeOnline/Authorize.aspx' specified in the request does not match the redirect URIs configured for the application '******************************'. 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.
     
    Did anybody have the same issue?
    I tried both the "MailKitMailProvider" and "CoreMailProvider" but the issue remained the same.
     
    Growing Member
    Posts: 87
    Growing Member
      Hi Timo!
      Are you testing this from host or a specific portal ?
      Veteran Member
      Posts: 1143
      Veteran Member
      Growing Member
      Posts: 87
      Growing Member

        Since it's host, the logic for https vs http for the exchange provider's redirect URL depends on the SSL settings for the host's portal. Look in the 'HostSettings' table for SettingName 'HostPortalId' (I'm not sure how that gets set since "Host Settings" disappeared with the Persona Bar?). The use the HostPortalId to lookup in PortalSettings for PortalId = HostPortalId and SettingName = SSLSetup. Make sure setting value is "1" ("On").

        Veteran Member
        Posts: 1143
        Veteran Member
          Posted By johnhenley on 9/4/2024 4:40 PM

          Since it's host, the logic for https vs http for the exchange provider's redirect URL depends on the SSL settings for the host's portal. Look in the 'HostSettings' table for SettingName 'HostPortalId' (I'm not sure how that gets set since "Host Settings" disappeared with the Persona Bar?). The use the HostPortalId to lookup in PortalSettings for PortalId = HostPortalId and SettingName = SSLSetup. Make sure setting value is "1" ("On").

          I did that but it crashed the "return page" :-(

           

           

          Growing Member
          Posts: 87
          Growing Member
            Aha, progress!
            Growing Member
            Posts: 87
            Growing Member
              What do you mean by “crashed” the page?
              Veteran Member
              Posts: 1143
              Veteran Member

                Ok sorry. I already forced the main site to SSL before posting this, but that lead to a 503 error when trying to complete the process, not sure why..

                Advanced Member
                Posts: 223
                Advanced Member
                  If you figure out all the proper setup to make it work, we would greatly benefit from having that process documented :) I could never make it work with exchange.
                  Growing Member
                  Posts: 87
                  Growing Member

                    Posted By Timo Breumelhof (40F) on 9/5/2024 9:24 AM

                    Ok sorry. I already forced the main site to SSL before posting this, but that lead to a 503 error when trying to complete the process, not sure why..



                    Is the 503 error on DNN side? Or exchange?
                    What type of certificate are you using for DNN? And is the DNN endpoint accessible publicly?
                    Page 1 of 212 > >>

                    These Forums are dedicated to the discussion of DNN Platform.

                    For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                    1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                    2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                    3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                    4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                    5. No Flaming or Trolling.
                    6. No Profanity, Racism, or Prejudice.
                    7. Site Moderators have the final word on approving / removing a thread or post or comment.
                    8. English language posting only, please.

                    Would you like to help us?

                    Awesome! Simply post in the forums using the link below and we'll get you started.

                    Get Involved