Skip to content

Add support for Office 365 smtp online exchange using SASL XOAUTH2 #2981

@HanoRossouw

Description

@HanoRossouw

We tried during our setup to configure Office 365 for sending mails via the cloud service but apparently they are moving away from basic auth and moving to oauth based smtp security (https://techcommunity.microsoft.com/blog/exchange/exchange-online-to-retire-basic-auth-for-client-submission-smtp-auth/4114750)

they have documentation on their new way of authenticating which might be implemented by other email vendors in near future as they move away from basic auth with smtp

https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#authenticate-connection-requests

This requires adding support for SASL XOAUTH2

AUTHENTICATE XOAUTH2
and the format is
base64("user=" + userName + "^Aauth=Bearer " + accessToken + "^A^A")

Workaround

You can use https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/send-email-smtp/smtp-authentication to get SMTP credentials compatible with FusionAuth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions