I'm looking for help transitioning from a legacy SMTP Send Mail system to Microsoft Azure AD authenticated email-sending-- can anyone offer advice or help?
A client of mine has been sending automated, aka headless, messages from FileMaker via an SMTP server using the Send Mail script step for years. The problem is that soon this method will no longer be supported, as authenticated SMTP will be replaced by OAuth2. My understanding is that we may have to replace our simple Send Mail script steps with some sort of Microsoft Graph API calls. While I'm sure I could figure out that dance given time, I'm looking for someone to either help us make the transition or to recommend an alternative to Azure AD that is DMARC-compliant (Domain-based Message Authentication, Reporting & Conformance, https://dmarc.org) such that the client's automated emails will still be seen as coming from my client's domain. Any leads?
Microsoft Graph API is quite easy to use when you just handle the authentication part first. I was surprised how easy the authentication part was also (compared to google apis for instance). Wim's link for the blog post is really useful (and there are a few other useful blog posts). Well authentication it self is simple fetch token and use it for subsequent calls, but setting the correct server-server client key in MS365 admin is not really obvious if you don't have something to start with (like those great blog posts).
I was just last week working with the api and the only issue I had when I was using it for fetching Outlook calendar events (list events endpoint) to get timezone correct.
API wants a header: Prefer: outlook.timezone="FLE Standard Time"
Setting a $variable did not work because FileMaker doesn't understand double quotes on curl options on calculation engine (tried with practically all the different ways I was able to imagine (Quote(), backslashed, single quotes etc). With BaseElements plugin setting header option was working and got the correct timezoned events.
With native Insert From Url I had to put options to text field and use that instead calculated variable. It's working but not the most clean way compared to just scripts and variables.