I am trying to authenticate a backend server with OAUTH in order to send emails from that backend server. The thing I don't understand is how can I do this if the server will only ever be run locally on a VLAN.
Is this even possible?
Backend server (Running Node) uses Basic Authentication credentials (username & password) to authenticate then send an email through Office 365 account to a user using SMTP. Basic auth is being deprecated though and is being replaced by OAUTH.
Replace basic authentication with OAUTH to authenticate and send emails from backend server through office 365 account.
Any help would be greatly appreciated.
The usual migration path here is Client Credentials Flow which should work like this:
Back end on private VLAN must be able to make outbound calls to the Authorization Server (Azure AD in your case).
The advantage should be that the credential is not revealed every time you want to send an email, and OAuth access tokens are used instead.
This should work in locked down environments where outbound calls are restricted. Usually a whitelist is configured in the firewall - eg all URLs other than Azure AD are blocked.