OAuth2 Email API for M365/D365
Budget / Salary$250–750
TypeFreelance project
LocationRemote
Posted52 minutes ago
I need a compact, server-side REST API that will accept a caller’s email address, Azure Application ID, tenant ID, and saved app secret, obtain an OAuth 2.0 token from Azure AD, and then use that token to send an email from the caller’s Dynamics 365 mailbox. The same endpoints must also work for ordinary Microsoft 365 / Outlook mailboxes, so a single implementation can reach both services transparently.
The email endpoint has to handle plain-text bodies, full HTML content, and file attachments without size or content-type restrictions coming from the API layer. No interactive login flow is allowed—authentication must rely solely on the pre-configured app secret.
Deliverables:
• Secure REST endpoint(s) for ① token acquisition and ② message dispatch
• Clear parameter list: callerEmail, appId, tenantId, clientSecret, plus standard mail fields
• Sample request/response JSON and a quick-start script (PowerShell or curl)
• Brief deployment guide for Azure App Service or container hosting
• Source code with comments and instructions to rotate the app secret safely
Acceptance criteria:
• Successful end-to-end send of HTML email with attachment from a Dynamics 365 mailbox confirmed in the D365 “Email Messages” table
• Same payload delivered through a Microsoft 365 mailbox to an external recipient
• OAuth 2.0 token returned in JSON alongside any diagnostic headers, with expiry handled gracefully
I will test with my own tenant once you supply the finished API and guide.
The email endpoint has to handle plain-text bodies, full HTML content, and file attachments without size or content-type restrictions coming from the API layer. No interactive login flow is allowed—authentication must rely solely on the pre-configured app secret.
Deliverables:
• Secure REST endpoint(s) for ① token acquisition and ② message dispatch
• Clear parameter list: callerEmail, appId, tenantId, clientSecret, plus standard mail fields
• Sample request/response JSON and a quick-start script (PowerShell or curl)
• Brief deployment guide for Azure App Service or container hosting
• Source code with comments and instructions to rotate the app secret safely
Acceptance criteria:
• Successful end-to-end send of HTML email with attachment from a Dynamics 365 mailbox confirmed in the D365 “Email Messages” table
• Same payload delivered through a Microsoft 365 mailbox to an external recipient
• OAuth 2.0 token returned in JSON alongside any diagnostic headers, with expiry handled gracefully
I will test with my own tenant once you supply the finished API and guide.
Apply on Freelancer →
Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.