How to Connect
Prerequisites
Before setting up the Microsoft Dynamics 365 integration in iPaaS.com, ensure you have the following:
A Microsoft Dynamics 365 Business Central account with admin access.
Access to the Microsoft Entra Admin Center for app registration.
The following values from the registered app:
Tenant ID
Client ID
Client Secret
Scope
How to Create an Application for iPaaS.com Integration
To set up authentication for either OAuth 2.0 Client Credentials Grant or Authorization Code Grant, an application must be created in the Microsoft Entra Admin Center. Follow these steps:
Navigate to the Microsoft Entra Admin Center.
Log in with your Microsoft Admin Account.
Go to Applications → App Registrations.
Click on Create New Registration.
Provide a display name for this application.
Select the appropriate option to determine who can use this application.
Provide a Redirect URI (optional);
Use this URI for returning authentication responses:
https://portal.ipaas.com/customer/subscription-mgmt/subscriptions/authorization/app
Note: In this scenario, the Tenant ID will remain the same as we are using a single tenant belonging to Red Rook.
Steps to Generate Client Credentials
Click on the Certificates & Secrets tab.
Click on New Client Secret.
Add a description and set the expiration period for the client secret.
Click on Add to generate the client secret.
Note: Ensure to save the client secret in a secure location, as it can only be copied once and will not be displayed again.
Steps to Add Permissions in Dynamics 365 Business Central
To grant the necessary permissions for Microsoft Dynamics 365 Business Central:
Navigate to API Permissions in the Microsoft Entra Admin Center for your application and click on Add a Permission.
In the Request API Permissions dialog, select Dynamics 365 Business Central.
This step adds accessibility to Dynamics 365 Business Central data and functionality.Assign the desired Application Permissions to the user.
Example: Application.ReadWrite.All for full access to the API.Review the permissions that have been added to your application under API Permissions. Verify that all required permissions are present and correctly assigned.
Enable APIs in Busines Central
In MBC, search for "Web Services" and navigate to the page
Select "New" to add a new Web Services
Select the appropriate "Object Type" and "Object ID"
Enter the appropriate "Service Name"
Select "Publish"
Repeat for each service in the below table
Name | Object Type | Object ID | Service Name |
Customer Card | Page | 21 | CustomerCard |
Location Card | Page | 5703 | Locations |
Item Card | Page | 30 | ItemCard |
Shipping Agents | Page | 428 | ShippingAgents |
Sales Order | Page | 42 | SalesOrders |
Sales Order Lines | Page | 46 | SalesOrderLines |
Items By Location | Query | 2554 | Itemsbylocation |
Customer Price Groups | Page | 7 | /CustomerPriceGroups |
Configure Subscription Settings
Below are the fields required to configure your Microsoft Dynamics 365 subscription in iPaaS.com:
Field | Description | Required | Example |
Name | A unique name for identifying your subscription. | Yes | Dynamics365_Integration |
Versions | The integration version. | Yes | v1.0 |
Company Name | The name of your organization. | Yes | YourCompany |
Tenant ID | The directory (tenant) ID from app registration. | Yes | YourTenantID |
Scope | The scope for API permissions. | Yes | |
Client Secret | The secret key generated for the application. | Yes | YourClientSecret |
Client ID | The application (client) ID from app registration. | Yes | YourClientID |
Grant Type | The type of authentication grant used. | Yes | client_credentials |
Environment | The Dynamics 365 environment (e.g., Sandbox, Prod). | Yes | iPaaS_Sandbox |
API URL | The base API URL for Dynamics 365. | Yes |
How to Populate Subscription Settings
Follow these instructions to locate the required information and populate the subscription fields in iPaaS.com:
API URL: The base API URL for Microsoft Dynamics 365 is:
https://api.businesscentral.dynamics.com
.Environment: The environment (e.g., Sandbox or Production) is configured in Dynamics 365. To locate your environment:
Go to Settings → Admin Center in Dynamics 365.
Navigate to Operations to view and select the environment.
Grant Type: Must be set to client_credentials in all configurations.
Client ID:
Client Secret: Generate a client secret in the Microsoft Entra Admin Center:
Scope: is set to:
https://api.businesscentral.dynamics.com/.default
.Tenant ID:
Company Name: The name of your company in Dynamics 365 is required. To locate this:
External and Internal IDs for Microsoft Dynamics 365 Integration
When transferring data between Microsoft Dynamics 365 and iPaaS.com, External IDs and Internal IDs are crucial for ensuring accurate and seamless synchronization.
Transferring Data from Microsoft Dynamics 365 to iPaaS.com
To transfer data from Microsoft Dynamics 365 to iPaaS.com, you will need the External ID. Follow these steps for each supported data type:
Supported Data Types:
Company and Customer
Sales Order
Product
Location
Shipping Method
Company and Customer:
Navigate to Microsoft Dynamics 365 → Sales → Customers.
Click on the customer you wish to transfer.
Use the Customer No as the External ID.
Open the Webhook submission in iPaaS.com via Integration Monitoring → Manual Sync and fill out:
Field | Data |
System | MSD 365 |
Mapping Collection | Dynamics Company Add/Update to iPaaS |
Scopes | Created/Updated |
External ID | Customer No from Dynamics 365 |
Sales Order:
Navigate to Microsoft Dynamics 365 → Sales → Sales Order.
Use the Sales Order No as the External ID.
Enter this in the webhook submission in iPaaS.com.
Product:
Navigate to Microsoft Dynamics 365 → Sales → Items.
Use the Item No as the External ID.
Open the Webhook submission in iPaaS by navigating to the Integration Monitoring/Manual Sync and fill in the required fields and enter the Item No in the external ID field, then transfer the data.
Location:
Search for Locations in Microsoft Dynamics 365.
Use the Location Code as the External ID.
Open the Webhook submission in iPaaS by navigating to Integration Monitoring → Manual Sync and fill in the required fields and enter Location Code in external ID field, then transfer the data.
Shipping Method:
Search for Shipping Agents in Microsoft Dynamics 365.
Navigate to Shipping agents as shown in the image below.
Use the Shipping Agents Code as the External ID.
Open the Webhook submission in iPaaS by navigating to Integration Monitoring → Manual Sync and fill in the required fields and enter Shipping Agents Code in external ID field, then transfer the data.
Transferring Data from iPaaS.com to Microsoft Dynamics 365
To transfer data from iPaaS.com to Microsoft Dynamics 365, you will need the Internal ID (iPaaS.com ID). This internal ID is only visible within the iPaaS system.
Sales Order from iPaaS:
Navigate to Data Management → Transactions in iPaaS.com.
Locate the transaction you wish to transfer and click View Details.
Copy the Internal ID from the URL bar as below.
Open the Webhook submission in iPaaS.com via Integration Monitoring → Manual Sync and fill out:
Field | Data |
System | MSD 365 |
Mapping Collection | Dynamics Company Add/Update From iPaaS |
Scopes | Created/Updated |
iPaaS.com ID | Internal ID from URL bar |
Note: Follow the same procedure for other data types supported in your integration.
Notes on Custom Fields:
Currently, no additional custom fields or special formats are utilized for Microsoft Dynamics 365 integration.
Custom Fields Integration
The integration between Microsoft Dynamics 365 and iPaaS.com supports extended custom fields for various data models, enhancing flexibility and data synchronization capabilities.
Supported models for custom field integration:
Sales Order (Transaction) – Both from and to iPaaS
Customer – Both from and to iPaaS
Company – Both from and to iPaaS
Sales Order Line (Transaction Line) – Both from and to iPaaS
Order Tracking (Transaction Tracking) – To iPaaS only
Product – Both from and to iPaaS
Adding Custom Fields (Dynamics 365 to iPaaS.com)
Follow these steps to configure custom fields from Dynamics 365 to iPaaS.com:
Create a Custom Field in Dynamics 365 Subscription
Create Corresponding Custom Field in iPaaS
Establish Field Mapping
Transfer Data to iPaaS
Once mappings are confirmed, initiate the data transfer.
Example product GET response with the custom field populated:
{
"@odata.etag": "W/\"JzIwOzEyMTIwNjMyMTc5MTExMDYzNDkxMTswMDsn\"",
"No": "10010",
"Description": "DISC. REPLACEMENT 10039",
"Base_Unit_of_Measure": "EA",
"UPC_Code": "760479100105",
"Product_Group_Code": "BULK",
"CatItemGroup": "CLASSIC WATERMELON LED W/STAINLESS STEEL FLANGE MOUNT BEZEL",
"Unit_Price": 0.16,
"Manufacturer_Code": "",
"Replenishment_System": "Purchase"
}The CatItemGroup field is successfully populated and stored in the iPaaS product custom field.
Adding Custom Fields (iPaaS.com to Dynamics 365)
Follow these steps to configure custom fields from iPaaS.com to Dynamics 365:
Create a Custom Field in Dynamics 365
Map Data in iPaaS.com
Validate Data Transfer
Note: External custom fields can be created for any model within Dynamics 365, enabling flexible and powerful integration scenarios.
Authentication Methods
OAuth 2.0 Client Credentials Grant
The OAuth 2.0 client credentials grant flow permits a web service (confidential client) to use its own credentials, instead of impersonating a user, to authenticate when calling another web service. In this flow:
Permissions are granted directly to the application by an administrator.
The app itself has authorization to perform actions as there is no user involved in the authentication.
This flow provides an access token valid for 60 minutes (1 hour). To generate an access token, ensure the following details are correctly configured in Subscription Settings:
Tenant ID: The directory (tenant) ID where the application is registered.
Grant Type: Must be statically set to
"client_credentials"
.Client ID: The application (client) ID assigned to your app during registration.
Client Secret: The secret key generated for the application. (Value must be saved in a secure location).
Scope: The specific permissions or resources the app is requesting access to.
Note: Must be statically set to https://api.businesscentral.dynamics.com/.default for this configuration.
The value passed for the scope parameter in this request should be the resource identifier (application ID URI) of the resource you want, suffixed with .default.
The .default scope is used to refer generically to a resource service (API) in a request, without identifying specific permissions.”
Initialization Support
The following types of data support initialization and can be transferred in bulk:
Customer Category TO iPaaS.com
Location TO iPaaS.com
Shipping Method TO iPaaS.com
All other data types must be configured manually during the integration process.
Throttling
Throttling ensures that 365's API isn’t overwhelmed by excessive API calls, preserving system performance during heavy data transfers.
While the throttling fields are required, the values are pre-populated by the integration settings. For more details, refer to Subscription Configuration – Edit.
Troubleshooting
Missing Credentials or Errors in API Configuration
Ensure all required fields in subscription settings are completed (e.g., Tenant ID, Client ID, Client Secret, and Scope).
Verify that permissions have been granted in API Permissions for Dynamics 365 Business Central.
Debugging OAuth Issues
For expired or invalid tokens, reauthorize the application in the Entra Admin Center.
Ensure the Redirect URI matches exactly with the one provided during app registration.