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
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)
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.
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.
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.
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.
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 .
- Register in the Azure Portal App.
- Search azure.com and login with your id.
- After you login, the Azure Active Directory page will appear
- Go to the App registration.
Click on the new registration menu.
- Register an application with name like Postman, Power Automate and others.
- Mark who can e this registered token.
- Select Redirect action for Web and enter the web URL for Dev, UAT or Production with /auth
- Now you can view below details:
- Application (client) ID –> Note down this app client id. It will be used in D365.
- Directory (tenant) ID –> Note down this tenant id.
- Now we need to create secret ids then click on Certificates & secrets menu.
- Click on new client secret menu to create new client id.
- Enter description for client secret.
- Select Expires duration as per requirement and then Add.
- Client secret Id is created –> Note down this client secret id.
Register Azure Active Directory Application in D365FO
- Go to D365FO –> System administration –> Setup–> Azure Active Directory applications form.
- 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 firstname.lastname@example.org!