I am trying to send an email using the code and the outlook smtp protocol, but there is an authentication error

建伟 周 0 Reputation points
2024-11-12T03:35:48.98+00:00

I created an application in Azure and exchanged the access_token with code, but I get an error when using jakarta.mail: “535 5.7.3 Authentication unsuccessful [SGXP274CA0007.SGPP274.PROD. outlook.com 2024 -11-12t03:19:03.964z 08dd02bfa482f37e]”.

An error occurred while using the microsoft SDK: “Request failed. The remote server returned an error:(401)”. Is there anything else I need to configure in Azure?

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
654 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
4,087 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,004 questions
{count} votes

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.