OAuth for email servers

42 views
Skip to first unread message

Mong Khon

unread,
Nov 21, 2022, 10:42:52 PM11/21/22
to DSpace Community
Dear colleagues,

Microsoft has strongly advised not to use SMTP Auth as it will not be supported in the future
,leaving OAuth as the only viable authentication type (https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online)

We are trying to figure out whether SMTP authentication using OAuth is supported on DSpace. If so, how can we configure this?

Kind regards,
Mong

Tim Donohue

unread,
Dec 9, 2022, 2:10:38 PM12/9/22
to DSpace Community
Hi Mong,

I'm not entirely sure offhand how to configure SMTP auth using OAuth.  But, I can verify that DSpace uses the JavaMail API to authenticate via SMTP.  Therefore, I suspect you may need to configure `mail.extraproperties` (see dspace.cfg) to pass along whatever additional properties are required for JavaMail to authenticate using OAuth.  I know these extraproperties are also required when configuring DSpace to use Gmail (so I suspect Microsoft OAuth may be similar). 

Here's the setting in dspace.cfg that I'm talking about: https://github.com/DSpace/DSpace/blob/main/dspace/config/dspace.cfg#L204-L208


If you find the correct settings for Microsoft's OAuth, please let us know...we could always add them to the docs as a hint for others.

Tim

Mark H. Wood

unread,
Dec 12, 2022, 8:45:57 AM12/12/22
to dspace-c...@googlegroups.com
On Fri, Dec 09, 2022 at 11:10:38AM -0800, 'Tim Donohue' via DSpace Community wrote:
> I'm not entirely sure offhand how to configure SMTP auth using OAuth. But,
> I can verify that DSpace uses the JavaMail API to authenticate via SMTP.
> Therefore, I suspect you may need to configure `mail.extraproperties` (see
> dspace.cfg) to pass along whatever additional properties are required for
> JavaMail to authenticate using OAuth. I know these extraproperties are
> also required when configuring DSpace to use Gmail (so I suspect Microsoft
> OAuth may be similar).

https://javaee.github.io/javamail/OAuth2

Ask Google for "javamail oauth" to get a number of articles on this.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc
Reply all
Reply to author
Forward
0 new messages