Select to view content in your preferred language

Oauth2 for SMTP Email Output

646
11
02-03-2026 09:44 AM
Teresa_Blader
Frequent Contributor

My agency is shutting down any SMTP emails that just use a username and password since it's now legacy protocol in Office 365. Because of this I won't be able to use the SMTP output as it is in ArcGIS Velocity because it doesn't support Oauth2. So looking for someway to integrate Oauth2 for the email and password for office 365 piece of SMTP email output. I don't really understand how all of that works or if it's even possible. 😅

https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-...

11 Comments
JeffSilberberg

 

Not sure if this would work for you, but instead of sending Mail, use the HTTP capability to post to a Webhook/RestAPI endpoint.  Then use that tool to send your emails. 

SendGrid and Power Automate are two possible tools to consider. 

Another option is to use something like mxRoute as an intermediate mail routing tool. 

https://mxroute.com/

 

 

 

Teresa_Blader

Teresa_Blader_0-1770150792908.png

Power Automate is definitely an option. What might be the way I'd set that up?

I've got these two RTAs right now, first is sending just me an email when new incidents appear in the last 5 minutes. The second is a dynamic email that is sending an email to the email attribute from all the points that were queried from a specific buffer of a another point (donation location). 

Would I essentially be moving these flows completely over to power automate or just pushing the results before the email to a table or something and power automate would watch that??

"Sending email with the Graph API " is something my IT suggested, but maybe would need support on how to populate the details with the way that arcgis velocity would have filled out the SMTP stuff.

JeffSilberberg

Well, 

    Obviously you approach may be differement.

    But I just use Output --> Web and Messaging --> HTTP, where you have the send email node. 

JeffSilberberg_0-1770151854521.png

  Depending on what you target built the payload in Arcade. 

 

 

Teresa_Blader

So you have to set up an HTTP poller to send to PowerAutomate?

I pretty much know nothing about webhooks and payloads full disclosure.

JeffSilberberg

 

No, you are setting up an output node, not an input node. 

 

Teresa_Blader

Correct, so I'm asking if you set up an output node for power automate? 

Or you're just saying that to do a web hook email, you used the HTTP output?

Our IT wants to avoid having to build an external webhook.

April 1st Microsoft is turning for sure turning off SMTP. So now I'm looking at using power automate to do send an email, but I'm not sure at what point I would involve power automate. Does the RTA still need to run to a certain point before power automate is used, or am I completely discarding the RTA/ArcGIS Velocity and just using powerautomate. 

 

JeffSilberberg

@Teresa_Blader 

    I would simply change out your output to the HTTP node and Post to Power Automate or some other tool of your choice. There are many options.   You could do it in parallel with what you already have, and then remove the email from the RTA.  

  ---   

   

 

Teresa_Blader

Cool. Ok so on the same page.

What would posting to power automate look like? What are the things I have to do to enable that?

JeffSilberberg

 

Good Morning, 

   So from the Power Automate side, I can only talk in theory as I don't use the tool myself.  But a quick Google search finds a number of how-tos. 

https://tinyurl.com/7mfa6mx9

On the Velocity side, you will need to build the body of the message as a JSON object in Arcade and return it for the Node to send.  I can help you get started, as I have done many of them.  Basically, build up your variables and then return the JSON string -- 

var to = 'user@email.com';
var subject = 'This is a test Email';
var message = 'The test message is meant to get the API working';
return '{"to":["' + to + '"], "subject":"' + subject + '", "message":"' + message + '"}';

 

 

JeffSilberberg

@Teresa_Blader 

    I just thought I would check back with you to see if you were able to implement a working solution.

    ----