Setting up e-mail through Exchange Online and Oauth - VisualCron - Forum

Community forum

John Moe
2021-10-12T02:59:06Z
I'm trying to set up an email connection to Exchange Online using Oauth (since basic auth will be retired soon ). I've tried following the guides for SMTP  and Exchange EWS , but neither seem to mention Oauth; they look like they were written before that feature was available.

I've created my service principal in Azure AD, but I'm not sure what permissions it needed? I've given it an Application Permission of Microsoft Graph -> Mail.Send and granted admin consent; is that enough?

I've then entered the following info into a Visual Cron SMTP connection:

  • Main Settings

    • Address - smtp.office365.com
    • Port - 587

  • Authentication

    • Authentication type - OAuth
    • Use VisualCron registered app - not selected (I presume there's some way to define the registered app within Visual Cron, but I haven't found it yet, and am just trying to get this working here for now)
    • Application ID - from the Service Principal
    • Client Secret - from the App Registration

  • Encryption

    • Cryptographic protocol - TLS
    • Security mode - Explicit
    • Allowed SSL/TLS versions - TLS 1.2 & 1.3

  • Extra settings

    • Tenant ID - From Azure AD
    • Tenant Name - From Azure AD
    • Tenant Primary Domain - <Tenant Name>.onmicrosoft.com


However, it doesn't seem to be working. When I click "Test" and enter a to and from e-mail address, I get a popup window in Visual Cron saying "Failure -> Connection test failed. Error: Unhandled error: One or more errors occurred". I'm also not seeing any auth failures in the Azure AD Sign-In logs (under Service Principals), so I presume it's not even getting to the point of trying to authentication to Azure.

Can anyone help me?
Support
2021-10-13T08:40:29Z
Originally Posted by: John Moe 

I'm trying to set up an email connection to Exchange Online using Oauth (since basic auth will be retired soon ). I've tried following the guides for SMTP  and Exchange EWS , but neither seem to mention Oauth; they look like they were written before that feature was available.

I've created my service principal in Azure AD, but I'm not sure what permissions it needed? I've given it an Application Permission of Microsoft Graph -> Mail.Send and granted admin consent; is that enough?

I've then entered the following info into a Visual Cron SMTP connection:


  • Main Settings

    • Address - smtp.office365.com
    • Port - 587

  • Authentication

    • Authentication type - OAuth
    • Use VisualCron registered app - not selected (I presume there's some way to define the registered app within Visual Cron, but I haven't found it yet, and am just trying to get this working here for now)
    • Application ID - from the Service Principal
    • Client Secret - from the App Registration

  • Encryption

    • Cryptographic protocol - TLS
    • Security mode - Explicit
    • Allowed SSL/TLS versions - TLS 1.2 & 1.3

  • Extra settings

    • Tenant ID - From Azure AD
    • Tenant Name - From Azure AD
    • Tenant Primary Domain - <Tenant Name>.onmicrosoft.com


However, it doesn't seem to be working. When I click "Test" and enter a to and from e-mail address, I get a popup window in Visual Cron saying "Failure -> Connection test failed. Error: Unhandled error: One or more errors occurred". I'm also not seeing any auth failures in the Azure AD Sign-In logs (under Service Principals), so I presume it's not even getting to the point of trying to authentication to Azure.

Can anyone help me?



Dealing with this via email

Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scott Morgan
2021-12-18T05:28:14Z
Support - How was this issue resolved using exchange ews and oauth?

Can anyone elaborate on the specifics of what one needs to configure to get the exchange ews working with 0365 using oauth?
Jonah Kosfiszer
2022-01-05T23:10:13Z
I also have the same problem. I have a C# app using graph library working fine, but when I try and use the parameters in Exchange EWS connection, I can't get it to work.
Support
2022-01-12T13:27:22Z
Originally Posted by: Jonah Kosfiszer 

I also have the same problem. I have a C# app using graph library working fine, but when I try and use the parameters in Exchange EWS connection, I can't get it to work.



All of you who are having issues with this, please send us an email to support@visualcron.com - make sure you've read the documentation and set all the properties from the Azure app in to VisualCron
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Lee
2022-05-19T15:25:08Z
Originally Posted by: Support 

Originally Posted by: Jonah Kosfiszer 

I also have the same problem. I have a C# app using graph library working fine, but when I try and use the parameters in Exchange EWS connection, I can't get it to work.



All of you who are having issues with this, please send us an email to support@visualcron.com - make sure you've read the documentation and set all the properties from the Azure app in to VisualCron



Hi Michael,

We will email you directly as we are having the same problem.

Thanks
Scroll to Top