Skip to main content

Posts

Showing posts with the label Integration

How to Configure Microsoft Graph API for Email in Dynamics 365 Finance & Operations

Meta Description: Learn how to replace SMTP with Microsoft Graph API in D365FO. A step-by-step guide to Azure App Registration, API permissions (Mail.Send), and Email Parameter setup. Introduction With Microsoft moving towards modern authentication, the traditional SMTP setup in Dynamics 365 Finance & Operations is being phased out. Using Microsoft Graph API is now the standard for sending secure, reliable emails. In this post, I will walk you through the technical configuration required to bridge Azure Active Directory (Entra ID) and D365FO. Phase 1: Azure Portal Configuration The first step is creating a secure entry point in the Azure Portal. (You must have admin rights on Azure Portal ) App Registration: Create a new registration named DemoMails . (Write your own name) Credentials: Note down the Application (Client) ID API Permissions: This is the most crucial part. You must add Application Permissions for Mail.Send under Microsoft Graph. Crucial Step: Don't forget...

Consuming an External REST API in Dynamics 365 Finance & Operations (X++) and Saving Data into a Custom Table

  Introduction In this blog, I will explain how I consumed an online REST API in Microsoft Dynamics 365 Finance & Operations (D365 FO) using X++ and CLR Interop , deserialized the JSON response using Data Contract classes , and finally stored the data in a custom table . This is a common real-world integration scenario where external systems expose data via REST APIs and D365 FO needs to consume and persist that data. For this demo, I used the following public REST API : API URL: https://api.restful-api.dev/objects Solution Overview The solution consists of four X++ classes : MZNFRConsumeRestAPI – Main logic class (API call, deserialization, DB insert) MZNFRConsumeRestAPIParentContract – Parent contract (wraps JSON list) MZNFRConsumeRestAPIHeaderContract – Header contract (id, name) MZNFRConsumeRestAPILinesContract – Child contract (nested data node) 📌 Class Structure Diagram API Response Structure The API returns a JSON array like this: [ { ...

D365 FO Customer Details Web Service Using X++ Integration API

  Dynamics 365 FO – Fetch Customer Details Integration API (With Full X++ Code + JSON Explanation) In this article, I am sharing the complete implementation of my Customer Details Integration API in Microsoft Dynamics 365 Finance & Operations (D365 FO). This API is designed to: ✔ Fetch a specific customer when CustAccount is provided in the JSON ✔ Fetch all customers when CustAccount is NOT provided ✔ Return multiple addresses and multiple contacts for each customer ✔ Return financial dimensions (BusinessUnit, CostCenter, Department, Project) ⭐ How the API Works 1. When CustAccount is provided If the JSON contains: { "DataAreaId": "USMF", "CustAccount": "1101" } ➡ The API returns only that specific customer's details, including their addresses, contacts, and dimensions. 2. When CustAccount is NOT provided If JSON is: { "DataAreaId": "USMF" } ➡ The API returns all customers f...