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

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Exchange | Exchange Server | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Hu-MSFT 4,085 Reputation points Microsoft External Staff
    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.