Skip to main content
All CollectionsSubscriptionsMicrosoft Dynamics Business Central 365
Microsoft Dynamics 365 Connections and Setting
Microsoft Dynamics 365 Connections and Setting

Integrate Microsoft Dynamics 365 with iPaaS.com to enable seamless data synchronization and management.

Updated over a week ago

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:

  1. Log in with your Microsoft Admin Account.

  2. Go to Applications → App Registrations.

  3. Click on Create New Registration.

  4. Provide a display name for this application.

  5. Select the appropriate option to determine who can use this application.

  6. 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

  1. Click on the Certificates & Secrets tab.

  2. Click on New Client Secret.

  3. Add a description and set the expiration period for the client secret.

  4. 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:

  1. Navigate to API Permissions in the Microsoft Entra Admin Center for your application and click on Add a Permission.

  2. In the Request API Permissions dialog, select Dynamics 365 Business Central.
    This step adds accessibility to Dynamics 365 Business Central data and functionality.

  3. Assign the desired Application Permissions to the user.
    Example: Application.ReadWrite.All for full access to the API.

  4. 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

  1. In MBC, search for "Web Services" and navigate to the page

  2. Select "New" to add a new Web Services

  3. Select the appropriate "Object Type" and "Object ID"

  4. Enter the appropriate "Service Name"

  5. Select "Publish"

  6. 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:

  1. API URL: The base API URL for Microsoft Dynamics 365 is:
    https://api.businesscentral.dynamics.com.

  2. Environment: The environment (e.g., Sandbox or Production) is configured in Dynamics 365. To locate your environment:

  3. Go to Settings → Admin Center in Dynamics 365.

  4. Navigate to Operations to view and select the environment.

  5. Grant Type: Must be set to client_credentials in all configurations.

  6. Client ID:

    1. Log in to the Microsoft Entra Admin Center.

    2. Go to App Registrations.

    3. Locate the app you registered and copy the Application (client) ID.

  7. Client Secret: Generate a client secret in the Microsoft Entra Admin Center:

    1. Go to your app in App Registrations.

    2. Click on Certificates & Secrets.

    3. Create a New Client Secret. Save it securely as it will only be shown once.

  8. Scope: is set to:
    https://api.businesscentral.dynamics.com/.default.

  9. Tenant ID:

    1. Navigate to App Registrations in the Microsoft Entra Admin Center.

    2. Copy the Tenant ID from the Overview page.

  10. Company Name: The name of your company in Dynamics 365 is required. To locate this:

    1. Go to Settings → My Settings in Dynamics 365.

    2. Check the Company Name field.

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:

  1. Company and Customer

  2. Sales Order

  3. Product

  4. Location

  5. Shipping Method

Company and Customer:

  1. Navigate to Microsoft Dynamics 365 → SalesCustomers.

  2. Click on the customer you wish to transfer.

  3. Use the Customer No as the External ID.

    1. If the customer type is Company, it will be added as a company in iPaaS.com.

    2. If the customer type is Person, it will be added as a customer in iPaaS.com.

  4. 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:

  1. Navigate to Microsoft Dynamics 365 → SalesSales Order.

  2. Use the Sales Order No as the External ID.

  3. Enter this in the webhook submission in iPaaS.com.

Product:

  1. Navigate to Microsoft Dynamics 365 → SalesItems.

  2. Use the Item No as the External ID.

  3. 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:

  1. Search for Locations in Microsoft Dynamics 365.

  2. Use the Location Code as the External ID.

  3. 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:

  1. Search for Shipping Agents in Microsoft Dynamics 365.

  2. Navigate to Shipping agents as shown in the image below.

  3. Use the Shipping Agents Code as the External ID.

  4. 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:

  1. Navigate to Data Management → Transactions in iPaaS.com.

  2. Locate the transaction you wish to transfer and click View Details.

  3. Copy the Internal ID from the URL bar as below.

  4. 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:

  1. Sales Order (Transaction) – Both from and to iPaaS

  2. Customer – Both from and to iPaaS

  3. Company – Both from and to iPaaS

  4. Sales Order Line (Transaction Line) – Both from and to iPaaS

  5. Order Tracking (Transaction Tracking) – To iPaaS only

  6. 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:

  1. Create a Custom Field in Dynamics 365 Subscription

    1. Navigate to your Dynamics 365 Subscription in iPaaS.com.

    2. Add the desired custom field.

    3. Example: Create a custom field named CatItemGroup within the Product module.

  2. Create Corresponding Custom Field in iPaaS

    1. In iPaaS.com, create a matching custom field (e.g., CatItemGroup).

  3. Establish Field Mapping

    1. Define the mapping between Dynamics 365 and iPaaS.com to ensure proper data synchronization.

  4. Transfer Data to iPaaS

    1. Once mappings are confirmed, initiate the data transfer.

    2. 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"
      }
    3. 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:

  1. Create a Custom Field in Dynamics 365

    1. In Dynamics 365, navigate to your iPaaS Subscription.

    2. Add the custom field in the appropriate module.

    3. Example: Create a custom field named ProductTest within the Product module.

  2. Map Data in iPaaS.com

    1. Map the custom field to static or dynamic data in iPaaS.

    2. Example payload with static data.

  3. Validate Data Transfer

    1. Ensure data flows accurately from iPaaS to Dynamics 365.

    2. Verify fields are correctly populated in Dynamics 365 after 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:

  1. Permissions are granted directly to the application by an administrator.

  2. 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:

  1. Tenant ID: The directory (tenant) ID where the application is registered.

  2. Grant Type: Must be statically set to "client_credentials".

  3. Client ID: The application (client) ID assigned to your app during registration.

  4. Client Secret: The secret key generated for the application. (Value must be saved in a secure location).

  5. 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.

Did this answer your question?