Email sending via instance with Microsoft Graph API and Oauth 2.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2019 06:02 AM
Azure registered application states connected from SNOW and I see the oauth token come back across but email notifications from the system sit there in a Ready state. I am not sure if this due to body information of the message being incorrect, improper delivery methods to Microsoft, or SNOW not being able to deliver the through Mail.Send. Has anyone out there used Graph API and SMTP to send notifications? Any help would be nice. I am not sure if I have to change a backend script or what that script would be. I would imagine I would need to create a new protocol (if possible) in SNOW to adapt https://docs.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=javascript but honestly I have no idea where the send email script lives.
Thanks in advance!
- Labels:
-
Best Practices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2019 01:31 PM
Well it seems this can be done at least with javascript in the background. Our main goal continues to be to add an API function for system level email. Changing 400+ notifications seems like a lot of horror for something that is honestly needing to change. SMTP send is dead as of enforcement of MFA by Microsoft as far as I can tell. Anyone ever face this before?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2019 09:04 PM
Hi Erik,
To make sure I'm understanding you correctly, are you attempting to make an api call to Microsoft Graph from SNow in order to automate sending email from a specific O365 account and that's not working? Or are you saying that you use SMTP for your SNow instance email to send from an account that lives in 0365 and it's no longer working because of MFA?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2019 05:33 AM
Michael,
So we setup an App Password on the mail to conquer the short run but the issue is Microsoft may get rid of those and honestly when anything talks to Azure / Office 365 now you are advised to go through Graph. So to speak to exchange you simply do so through the API. POST me/mail.send works in raw java and from the instance but the entire back end instance email would need to change.
It looks like SNOW has a trigger job to check the outbox and then runs it through SMTP sender scripts.
The overall goal is to replace SMTP with API transfers as Microsoft is stating is their overall goal moving forward with Azure. Yep they want to kill SMTP as it is a nightmare for security.
Anyway we did the App Password until I figure out how to do the system email but I also advised SNOW on this and sent over the bulletins and other information. Dunno why this does not get more traction honestly, beginning to think we are the only ones with an instance that sends outside of our org.
Erik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2022 06:21 AM
@Erik Lazaroff Did you make any headway on this?
