Example
What you'll build
This example builds an automation that connects to Microsoft Dynamics 365 Finance System and lists the address abbreviations configured in the environment. The automation logs the retrieved collection so you can confirm the connection and operation work end-to-end.
Operations used:
- List Abbreviations : Retrieves the address abbreviation records configured in the Microsoft Dynamics 365 Finance environment.
Architecture
Prerequisites
-
A Microsoft Entra ID application registered with Dynamics 365 Finance and Operations API permissions, along with its client ID, client secret, and token URL for the OAuth2 client-credentials grant.
-
The service URL of the target Microsoft Dynamics 365 Finance environment (for example,
https://<your-org>.operations.dynamics.com/data). -
The application must be registered as a user in the target Dynamics 365 Finance and Operations environment and assigned the security roles required for this connector's operations.
Setting up the Microsoft Dynamics 365 Finance System integration
New to WSO2 Integrator? Follow the Create a New Integration guide to set up your integration first, then return here to add the connector.
Adding the Microsoft Dynamics 365 Finance System connector
Step 1: Open the connector palette
Select Add Connection in the Connections section.
Step 2: Select the Microsoft Dynamics 365 Finance System connector
- Enter
microsoft.dynamics365.finance.systemin the search field. - Select the System connector card.
Configuring the Microsoft Dynamics 365 Finance System connection
Step 3: Bind the connection parameters to configurable variables
Bind every required connection field to a configurable variable.
- Config : The
authrecord, bound to thetokenUrl,clientId, andclientSecretconfigurables through the expression{auth: {tokenUrl, clientId, clientSecret, scopes}}. - Service Url : The target environment's OData endpoint, bound to the
serviceUrlconfigurable.
Step 4: Save the connection
Select Save Connection and verify that the connection appears in the Connections section.
Step 5: Set actual values for your configurables
- Select Configurations at the bottom of the project tree under Data Mappers.
- Enter a value for each configurable listed below before you run the integration.
- tokenUrl (
string) : The OAuth2 token endpoint for the Microsoft Entra ID application. - clientId (
string) : The client ID of the registered Microsoft Entra ID application. - clientSecret (
string) : The client secret of the registered Microsoft Entra ID application. - scopes (
string[]) : The OAuth2 scope requested for the client-credentials token, set to the environment base URL followed by/.default - serviceUrl (
string) : The OData endpoint of the target Microsoft Dynamics 365 Finance environment.
Configuring the Microsoft Dynamics 365 Finance System List Abbreviations operation
Step 6: Add an automation entry point
- Select Add Entry Point next to Entry Points.
- Select Automation.
- Select Create to accept the settings.
Step 7: Expand the connection and configure the List Abbreviations operation
- Select the + icon on the automation flow.
- Expand systemClient to display its operations.
- Select List Abbreviations. This operation has no required parameters, so the default result variable name is used as generated.
- Select Save.
Step 8: Log the List Abbreviations result
- Select the + icon on the connecting line between the operation and Error Handler.
- Expand Logging and select Log Info.
- Switch Msg to expression mode and enter
systemAbbreviationscollection.toJsonString(). - Select Save.
Try it yourself
Try this sample in WSO2 Integration Platform.
More code examples
The Dynamics 365 Finance Ballerina connectors provide practical examples illustrating usage in various scenarios. Explore these examples.





