SMTP OAuth device_code flow authentication problem

立軒 林 20 Reputation points
2024-06-27T09:42:17.28+00:00

I am creating a client that could make user connect to Exchange Online, and send E-mail as the logged-in user.

I have created the corresponding Organization, User and Application on Microsoft services, did the settings that seems necessary.

Conventional client like Thunderbird works no problem, but when I use the authentication message in AUTH XOAUTH2 it always returns "5.7.3 Authentication unsuccessful", I can't see where the problem is.

smtp_log.txt

smtp_oauth_test.txt

User's image

User's image

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,066 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,560 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
546 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Hu-MSFT 4,135 Reputation points Microsoft Vendor
    2024-06-28T07:29:38.15+00:00

    Hi,

    It looks like your question is more related to Development .To better solve your problem , I will add “Exchange Development” tag.

    But based on my personal experience, this link seems mentioned the same problem to yours: azure active directory - Office 365 XOAUTH2 for SMTP on native clients 535 5.7.3 Authentication unsuccessful - Stack Overflow

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.