Microsoft Dynamics 365 Business Central is a powerful Enterprise Resource Planning (ERP) solution that offers a wide range of customization options to meet the unique needs of your business. One such customization is to connect Business Central APIs and Web Service with OAuth. Microsoft Dynamics 365 Business Central, offers a set of powerful APIs and web services that allow businesses to connect and streamline their processes. To ensure secure and controlled access to these resources, OAuth has become a popular authentication protocol. In this blog post, we’ll explore how OAuth can be utilized to connect Business Central APIs and web services, ensuring efficient data exchange and integration.
Requirement:
We recently encountered a requirement where we need to integrate Business central APIs and Web Services with OAuth for efficient data Exchange.
Prerequisites:
What is OAuth?
OAuth, or Open Authorization, is an open standard and protocol that allows secure third-party access to a user’s resources without exposing their credentials. It is commonly used for enabling delegated access and authorization in the context of web applications and APIs. OAuth is designed to address the challenges of resource owners (users) granting access to their information stored on one site (the service provider) to another site (the consumer) without sharing their credentials.
Solution (Implementation Steps):
The integration process involves several key steps to ensure a smooth and secure connection:
Step 1: Access to Azure Portal.
Step 2: Search for “App registrations” and then choose the related link.
Step 3: To create a new app registration, choose “New registration”.
Step 4: Now Enter the “Name”, select “account type”, then choose “Register”.
Step 5: Go to “Authentication”, choose “Add a platform” and select “Web”.
Step 6: Enter the “redirect URl” of the application, and then choose “Configure”. For example: https://businesscentral.dynamics.com/
Step 7: Go to “API Permissions”, choose “Add a permission” & Find “Dynamics 365 Business Central” and click it.
Step 8: You can choose the required permissions according to your situation. For example: Choose Delegated permissions.
Step 9: Select the permissions, and then choose Add permissions.
Step 10: Choose Add a permission again, Click Dynamics 365 Business Central Central and Select Application permissions this time.
Step 11: Select the permissions you need, then choose Add permissions.
Step 12: Choose “Grant admin consent for Contoso” and click on Yes.
Step 13: Go to “Certificates & secrets”, Choose “New Client secret” & Enter “Description” and select “Expires”, then choose “Add”.
Step 14: The settings in Azure Portal is over.
NOTE: Don’t Forget to get “Client Secret ID” & “Value”. You can access the application (Client) ID from “Overview”. From “Endpoint”, you can get the “access token”. (See below Images)
Step 15: Log in to the BC environment you need to connect, and enter “Microsoft Entra Application” in tell me, then choose the related link.
Step 16: Click on “+New” and Enter “Client ID” and “Description”. For example:
Client ID: {3d009cdc-f25b-400c-9c4e-bed75156c552}
Description: BC_Integration
Step 17: Then assign permissions as shown in below image and confirm that the State is Enabled.
Permissions: D365 BUS PREMIUM
D365 FULL ACCESS
D365 FINANCE
Note: Super is not allowed.
Step 18: Business Central APIs can be accessed from “Web-Service”. Enter “Web service” in tell me, then choose the related link. To Access API select “OData V4 URL”.
Conclusion:
In conclusion, the integration of Business Central APIs and Web Services with OAuth is not just a technical requirement; it’s a strategic move towards a more efficient, secure, and controlled data exchange environment. By understanding the prerequisites, exploring the power of OAuth, and following the outlined integration steps, businesses can unlock the full potential of Microsoft Dynamics 365 Business Central, paving the way for a future-ready and optimized ERP ecosystem
Know the number of records in any Dataverse entity or table.
https://www.inkeysolutions.com/entity-record-counter
ATM Inspection PowerApp to ease ATM inspection and report generation process.
https://www.inkeysolutions.com/microsoft-power-platform/power-app/atm-inspection
Insert data into Many-to-Many relationship in Dynamics CRM very easily & quickly, using the Drag and drop listbox.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/drag-and-drop-listbox
Comply your Lead, Contact, and User entities of D365 CRM with GDPR compliance using the GDPR add-on.
https://www.inkeysolutions.com/microsoft-dynamics-365/dynamicscrmaddons/gdpr
Create a personal / system view in Dynamics CRM with all the fields on the form/s which you select for a particular entity using the View Creator.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/view-creator
© All Rights Reserved. Inkey IT Solutions Pvt. Ltd. 2024
Leave a Reply