Using oauth2 with JavaMail

%3CLINGO-SUB%20id%3D%22lingo-sub-1718681%22%20slang%3D%22en-US%22%3EUsing%20oauth2%20with%20JavaMail%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1718681%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20want%20to%20access%20our%20e-mails%20(Either%20personal%20account%20or%20domain%20accounts%20like%20-%20%3CA%20href%3D%22mailto%3Asomeuser%40somedomain.onmicrosoft.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Esomeuser%40somedomain.onmicrosoft.com%3C%2FA%3E)%20using%20OAuth2%20and%20JavaMail%20APIs...%20This%20link%20outlines%20how%20we%20can%20achieve%20this%20for%20gmail%20accounts%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fkgiann78.github.io%2Fjava%2Fgmail%2F2017%2F03%2F16%2FJavaMail-send-mail-at-Google-with-XOAUTH2.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fkgiann78.github.io%2Fjava%2Fgmail%2F2017%2F03%2F16%2FJavaMail-send-mail-at-Google-with-XOAUTH2.html%3C%2FA%3E.%20But%20when%20we%20try%20the%20same%20approach%20for%20microsoft%2C%20things%20don't%20work.%20Does%20MS%20plan%20to%20bring%20out%20support%20for%20JavaMail%20with%20OAuth2%3F%20Or%20if%20such%20support%20exists%2C%20can%20you%20please%20share%20some%20links%2Fpointers%20towards%20them%20-%20or%20share%20some%20sample%20java%20code%20that%20we%20can%20use%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EVenkatesh%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1718681%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOutlook%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Visitor

Hi,

 

We want to access our e-mails (Either personal account or domain accounts like - someuser@somedomain.onmicrosoft.com) using OAuth2 and JavaMail APIs... This link outlines how we can achieve this for gmail accounts: https://kgiann78.github.io/java/gmail/2017/03/16/JavaMail-send-mail-at-Google-with-XOAUTH2.html. But when we try the same approach for microsoft, things don't work. Does MS plan to bring out support for JavaMail with OAuth2? Or if such support exists, can you please share some links/pointers towards them - or share some sample java code that we can use?

 

Regards,

Venkatesh

 

0 Replies