OneByte: A Comprehensive Guide to Real-Time Integrations in D365FO | OnActuate
 In A-ERP, A-How To

Microsoft Dynamics 365 for Finance & Operations (D365FO) has evolved into purpose-built applications to help you manage business functions through integrations with other systems.

Synchronous API Integration is simply the real-time interaction (exchange of data) between  D365FO and an external system.



Implement these pre-requisites to enable D365FO app access to an external system.

  • Register an App with the Azure Active Directory in the Azure portal.
  • Register the AAD Application in D365FO

Integration Criteria

There are different ways to populate data to D365FO and retrieve data from D365FO. The integration option can be decided based on the following criteria:

  • Retrieve data from D365FO or populate data to D365FO
  • Real-time interaction with D365FO or batch processing of the data
  • Amount of data which needs to be exchanged (data volume)

Integration Options

There are multiple options for real-time Integrations:

  • Open Data Protocol (oData)
  • Custom Web Service
  • Business Events

Real-Time Integration: oData

The REST API provides a mechanism to interact in real-time or near real-time with the D365FO. oData can be used to populate, retrieve, update, and delete (CRUD) data in D365FO.

oData: Open Data Protocol (OData) is a standard protocol for consuming data exposed by D365FO. OData is a new Representational State Transfer (REST) based protocol for CRUD operations – C-Create, R-Read, U-Update, and D-Delete – that allows for integrating with D365FO. It is applied to all types of web technologies, such as HTTP and JavaScript Object Notation (JSON).

Data Entity: A data entity in D365 is an abstraction from the physical implementation of database tables. A data entity is a simplified de-normalized representation of underlying tables. A data entity represents a common data concept or functionality.

Endpoint: https://host_uri/data/publicCollectionName


Real-Time Integration- Custom Web Service

Custom services used to expose X++ functionality to third party system using attributes.

D365 provides standard attributes that can be set on the data contract class and its members to automatically serialize and de-serialize data that is sent and received across a network connection.

JSON (JavaScript Object Notation)-based custom service.

This feature enables X++ classes to be consumed as JSON services.

  • The return data set is in JSON format.
  • JSON is a compact, lightweight format that is commonly used to communicate data between the client and the server.

JSON Endpoint:




Business Events

The D365FO Business Events can send events/trigger/notification to external applications such as Azure Integrations, which can be used to handle specific integration or business process scenarios.

Previously, the Events that existed in D365FO were confined to use within D365FO. The new capability provides a framework that will allow business processes in

These business events can be used by

  • Azure Service Bus
  • Azure Logic Apps
  • Microsoft Flow
  • Azure Functions
  • HTTPS Trigger

Since these events happen in the context of business processes, they are called business events that enable business process integration. External business processes will subscribe to specific business events from D365FO to get notified when they occur. The business events can also be consumed as “triggers” in the D365FO connector.

A custom or OOTB (out-of-the-box) business event can trigger Azure Integration Services to process or forward the trigger to third-party applications.

Setup and Configurations
  • Mainly two configurations are needed: App Registration on Azure Portal
  • Register Azure Active Directory Application in D365FO


App Registration on Azure Portal

For registering an application on Azure Portal there are multiple steps involved .

Step 1:

  1. Register in the Azure Portal App.
  • Search and login with your id.
  1. After you login, the Azure Active Directory page will appear
  2. Go to the App registration.



Step 2:

Click on the new registration menu.

Step 3:

  1. Register an application with name like Postman, Power Automate and others.
  2. Mark who can e this registered token.
  3. Select Redirect action for Web and enter the web URL for Dev, UAT or Production with /auth

Step 4:

  1. Now you can view below details:
  2. Application (client) ID –> Note down this app client id. It will be used in D365.
  3. Directory (tenant) ID –> Note down this tenant id.

Step 5:

  1. Now we need to create secret ids then click on Certificates & secrets menu.

Step 6:

  1. Click on new client secret menu to create new client id.
  2. Enter description for client secret.
  3. Select Expires duration as per requirement and then Add.

Step 7:

  1. Client secret Id is created –> Note down this client secret id.


Register Azure Active Directory Application in D365FO
  1. Go to D365FO –> System administration –> Setup–> Azure Active Directory applications form.
  2. Click New and Add Noted Client Id above and name with the User ID.


One all the setups and configuration are completed; you can test the API via Custom services or DMF (Data Management Framework).



About the expert
Chirag Jain, Technical Architect, OnActuate

Chirag is a Microsoft Dynamics certified technical lead with 11 years of overall industry experience. He has worked extensively on customization and development of new functionalities in Dynamics 365 F&O, NAV, and LS Retail projects. He also worked on configuration of LCS, VSTS, and DevOps projects and led multiple implementations of Dynamics., and Power Platform including Power BI, Logic Apps, Power Apps, and integration with D365F&O and CE. Chirag holds multiple certifications including an MB-700 Microsoft Exam for Microsoft Dynamics 365: Finance and Operations Solution Architect, and MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer.

The “OneByte” blog series are technical how-to articles by OnActuate’s expert consultants covering Microsoft Business Applications (Microsoft Dynamics, Power Platform) and related technologies. Have a topic you’d like to learn more about? Email us at!

Our website uses cookies to personalize and enhance your experience and improve the delivery of information to you. By clicking "Accept", you agree to our use of cookies. Click “Learn more” to read our Privacy Policy