1

I could able to access mailbox using IMAP protocol and client credentials flow but if I try to send mail then it got failed with exception:

535 5.7.3 Authentication unsuccessful [PN2PR01CA0190.INDPRD01.PROD.OUTLOOK.COM 2023-04-10T11:36:49.717Z 08DB38497E3FD62E]

    at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:947)
    at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:858)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:762)
    at jakarta.mail.Service.connect(Service.java:364)
    at jakarta.mail.Service.connect(Service.java:222)
    at jakarta.mail.Service.connect(Service.java:171)

I am sure that on Azure app I have added SMTP.SendAsApp permission and admin grant is also given to the permission. Also by using power shell I have also given mailbox permission to application's service principle with access rights as FullAccess.

After little bit googling about the problem, I come across this, this and even some post from Microsoft mentions that this URL states that SMTP + client credentials flow is not supported but now I visit the URL then there is nothing any such thing mentioned by Microsoft, which is creating confusing state, whether I am doing something wrong that's why getting above exception or still SMTP with client credentials flow is not supported?

kavyaS
  • 8,026
  • 1
  • 7
  • 19
Amogh
  • 4,453
  • 11
  • 45
  • 106

0 Answers0