V2

Microsoft Dynamics Finance

Integrate with Microsoft Dynamics Finance and Operations via the OData REST API.

Revision History

0.0.0.8 - Initial release.

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. EG: "offline_access https://contoso.operations.dynamics.com/.default"
Resource URL String Dynamics Finance host URL, for example https://contoso.operations.dynamics.com.

Setup Notes

  1. Register an application in Entra ID (Azure AD) with application permissions under Dynamics ERP: Access Dynamics AX Custom Service,Access Dynamics AX data,Access Dynamics AX online as organization users.

In the application registration, go to "API Permissions."
Click on "Add a permission" and select "Microsoft APIs."
Search for and select "Dynamics ERP". Select Delegated permissions

  • Select the permissions: Access Dynamics AX Custom Service,Access Dynamics AX data,Access Dynamics AX online as organization users.
  • 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) and Resource URL.

  3. Scopes would typically be offline_access {resource URL}/.default
    Once you have an App Registration, you need to add that to your Dynamics Business Central environment.

  4. Configure the Finance and Operations Environment:

  • Go to System administration > Setup > Microsoft Entra applications
  • Register the same Client ID and assign it to a service account (User ID) with the necessary Finance and Operations security roles.
  • Enter the Application (Client) ID obtained from the Entra ID application registration.

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

Metadata Note: When clicking the Acquire Metadata button in the Connection settings within Flowgear, please give sufficient time for the action to complete successfully. Templates are made using Metadata that is obtained from your Finance and Operations environment. These files can be large and can take time to download and save correctly.
If you have issues with Metadata files when using templates, please re-click Acquire Metadata and provide a sufficient amount of time for the process to complete.

Methods

Query

Note on Company parameter and interaction with cross-company parameter:

  • When Company is blank, it defaults to the logged in company.

  • When Company is blank and cross-company set to true, Query will return data from all Companies.

  • When Company is blank and cross-company set to false, Query will return data linked to the default Company (the logged in Company).

  • When provided, but is different to logged in company, and cross-company set to true, Query will return data data linked to only that Company.

  • When provided, but is different to logged in company, and cross-company set to false, Query will return only global data and nothing linked to the given Company. This is not advised as data linked to a Company differing from the logged in company is not available when cross-company is set to false.

  • Recommended to leave cross-company set to true and change Company to the desired data source. Leave Company blank to access all available data.

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

Create

Parameter Type Notes
Connection Connection The connection profile used for Finance and Operations API calls.
EntitySet String The Finance and Operations entity set to create records in (for example, CustomersV3).
Company String Company ID where Items will be created. EG: USMF
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 Finance and Operations API calls.
EntitySet String The Finance and Operations entity set to update records in (for example, CustomersV3).
Company String Company ID where Items will be updated. EG: USMF
KeyFields String Comma separated key field names. EG: dataAreaId,AccountName
Items Array A stream of payload objects to update in the target entity set.
Return Type Notes
Response Array Result of the update operation.

Delete

Parameter Type Notes
Connection Connection The connection profile used for Finance and Operations API calls.
EntitySet String TThe Business Central entity set to delete records in (for example, CustomersV3).
KeyFields Object The Key Fields and their values of the item to be deleted. Unique fields provided by template.
Return Type Notes
Response Array Result of the update operation.

Usage Notes

In order to determine the logged in company, you can run the Query Template: Get Logged In Session Info.
This is the first template of the query list.