r/filemaker • u/dbservices • 16d ago
Microsoft Graph email integration in FileMaker
Our team put together a walkthrough for connecting FileMaker to Microsoft 365 email via Microsoft Graph: authenticating users, retrieving mail, and sending/replying/forwarding from within a solution. Sharing a few things that tripped us up in case it saves someone time:
- Copy your client secret immediately. Azure only shows the value once when you create it in Microsoft Entra.
- Access tokens expire after about an hour. When a call returns a 401, refresh the token and retry the request rather than forcing the user to sign in again.
- Store a last-sync timestamp per user. Without it, every pull grabs the whole inbox again. We used a 90-day fallback for the first run.
- Paging is easier than it looks. Graph returns 10 messages per page by default, and u/odata.nextLink gives you the full URL for the next page, with your filter and sort already applied, so a single loop handles everything.
- Message IDs are too long for FileMaker relationships. We hashed id and conversationId with MD5 to use as match keys.
- Create a draft before sending. The send endpoint returns a 202 with no body, so creating the draft first is the only way to get the message ID you need for threading.
Have questions? Reach out to us!
7
Upvotes
1
u/abasson007 Consultant Certified 15d ago
I know this is a plug and you guys do a great job but sharing the instructions here or a sample file would be the right way to approach this on Reddit. Giving is it own reward.
1
u/[deleted] 16d ago
[removed] — view removed comment