V2

Microsoft Dynamics Business Central

Integrate with Microsoft Dynamics Business Central via the V.20 REST API.

Revision History

0.0.0.1 - Initial release.
0.0.0.4 - Template changes.
0.0.0.10 - Added test cases.
0.0.0.13 - Node name correction.

Connection

Parameter Type Description
Tenant Id String The Azure Active Directory tenant ID used to issue OAuth tokens.
Client Id String The client ID from the Azure App Registration.
Client Secret Masked The client secret from the Azure App Registration.
Access Token Masked OAuth access token returned after delegated authorization.
Refresh Token Masked OAuth refresh token used to renew delegated access.
Scopes String The OAuth scopes requested during authorization. Default to "offline_access https://api.businesscentral.dynamics.com/.default"
Environment URL String The Business Central API root URL, e.g. https://api.businesscentral.dynamics.com/v2.0/tenant/environment/api/v2.0.
Default Company ID String Optional default company ID used when requests do not include CompanyId.

Setup Notes

  1. Register an application in Entra ID (Azure AD) with application permissions under Dynamics 365 Business Central: API.ReadWrite.All, Automation.ReadWrite.All and Dynamics ERP: Connector.FullAccess.

In the application registration, go to "API Permissions."
Click on "Add a permission" and select "Microsoft APIs."
Search for and select "Dynamics 365 Business Central". Select either Delegated permissions or Application permissions as advised by your system administrator. If unsure, select Application permissions.

  • If Delegated permissions select the permissions: user_impersonation and Financials.ReadWrite.All.
  • If Application permissions select the permissions: app_access, API.ReadWrite.All, AdminCenter.ReadWrite.All and Automation.ReadWrite.All.
  • Then click Add permissions at the bottom of the pane.
  1. Grant admin consent for the selected permissions or ensure the signed-in user has consented.
  2. Configure the connection with Tenant Id, Client Id, Client Secret, Scopes (if you have added any custom ones), Environment URL and Default Company ID (if required).

Once you have an App Registration, you need to add that to your Dynamics Business Central environment.

  1. Configure the Business Central Environment:
  • In the Business Central client, search for "Azure Active Directory Applications" and open the page.
  • Enter the Application (Client) ID obtained from the Entra ID application registration.
  1. Set Up Authentication:
  • Configure the Business Central Server instance to include the ValidAudiences parameter set to the application ID.
  • Configure the Business Central Web Server to include the AadApplicationId and AadAuthorityUri parameters.

Ensure the connection is properly set up in Flowgear by testing the connection in the connection settings.

Methods

Query

Parameter Type Notes
Connection Connection The connection profile used for Business Central API calls.
EntitySet String The Business Central entity set to query (for example, customers).
Options Object A query object with optional CompanyId and OData settings.
Return Type Notes
Response Array Result of the query.

Create

Parameter Type Notes
Connection Connection The connection profile used for Business Central API calls.
EntitySet String The Business Central entity set to create records in (for example, items).
Options Object A mutation object with optional CompanyId.
Items Array A stream of payload objects to create in the target entity set.
Return Type Notes
Response Array Result of the create operation.

Update

Parameter Type Notes
Connection Connection The connection profile used for Business Central API calls.
EntitySet String TThe Business Central entity set to update records in (for example, items).
Options Object A mutation object with optional CompanyId.
Items Array A stream of payload objects to update in the target entity set.
Return Type Notes
Response Array Result of the update operation.