Original Message:
Sent: Nov 24, 2023 09:48 AM
From: puran06
Subject: Email Integration (Email Agent) using Microsoft OAuth2 Authentication
Hi Josef,
Authentication failure can stem from various factors. Have you adhered to the guidelines outlined in
https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#use-client-credentials-grant-flow-to-authenticate-smtp-imap-and-pop-connections
Furthermore, you might need to specify the following parameters in the Email Connection properties field.
mail.imaps.auth.plain.disable=true;mail.imaps.auth.xoauth2.disable=false
These additional settings might be necessary to ensure proper authentication.
Original Message:
Sent: Nov 03, 2023 09:36 AM
From: Josef Scharl
Subject: Email Integration (Email Agent) using Microsoft OAuth2 Authentication
Hi,
I'm working on an Email Agent which should connect to an Outlook 365 Mailbox using Microsoft OAuth2 Authentication.
My peers in the Mailing Team registered "Automic" within Azure AD, granted the needed authorizations and finally gave me the Tenant ID, Client ID and Client Secret.
I tried to set up the recommended "Run Mail Job with Microsoft OAuth2 using Client Credentials" (Integration Email - Agent Guide).
In the Connection Object I specified:
- Mail Server
outlook.office365.com
and User Name (= Mail Address). - The Token Request URL with my Tenant ID, the Client ID and the Client Secret.
- Generic Body:
&grant_type=client_credentials&scope=https://outlook.office365.com/.default
- Properties:
mail.imap.sasl.enable=true;mail.imap.sasl.mechanisms=XOAUTH2
The part with the Tokes seems to work:
Info: Access Token regenerated
However, I get error messages.
When I hook "Secure IMAP" (mail.imap.ssl.enable=true)
Error: AUTHENTICATE failed.
Without "Secure IMAP" (mail.imap.ssl.enable=false):
Error: No login methods supported!
I think there is something missing at the Azure part, but my peers swear, that it's ok.
Any hint is very welcome.
Thanks, Tscho
PS: I'm using the latest Version: Integration.Email_Agent_21_0_1+build.1681740290834