Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » How to send email with OAuth (merged) (Oracle, 12.1, Enterprise Edition, Linux)
How to send email with OAuth (merged) [message #686448] Thu, 15 September 2022 01:10 Go to next message
praveenpraj
Messages: 21
Registered: October 2011
Location: India
Junior Member
Presently we are sending emails (Office 365) from database using UTL_SMTP.
Now as microsoft is going to discontinue basic authentication for SMTP, POP, IMAP etc., and forcing Modern authentication - OAuth 2.0,
how we authenticate using OAuth through existing PLSQL procedure which is using UTL_SMTP.
Re: How to send email with OAuth [message #686451 is a reply to message #686448] Fri, 16 September 2022 13:35 Go to previous messageGo to next message
Alien
Messages: 286
Registered: June 1999
Senior Member
Hi,

it depends on whether you already have an access token that you can use, or if you need to establish the full credential flow from the RDBMS.
In either case, UTL_SMTP.COMMAND allows you to send an AUTH, XOAUTH2 command followed by the access token. That takes care of the SMTP part.

If you need the full credentials flow, the best option is to use ORDS. In the relevant versions it has native OAUTH2 support packages. Use ORDS to get an access token, and the SMTP commands as indicated by Microsoft.

Regards,

Arian
Re: How to send email with OAuth [message #686754 is a reply to message #686451] Tue, 13 December 2022 08:32 Go to previous message
Paperogi
Messages: 1
Registered: December 2022
Junior Member
Hi,

<< the best option is to use ORDS. In the relevant versions it has native OAUTH2 support packages. Use ORDS to get an access token >>

But how we can use ORDS (and packages supporting OAUTH2) against real authentication service we have to use, that is Microsoft Identity Platform ?

I suppose that OAuth2 of ORDS has its own authentication service ...

Thank you for reply.

Previous Topic: ORDS 22.2.1.r2021302 configuration for adding other database
Goto Forum:
  


Current Time: Sun Jan 29 03:13:51 CST 2023