Settings for Microsoft Dynamics 365 Business Central

This topic describes how to set up a Dynamics 365 Business Central connection for DataSync.

To configure a new connection

  1. Log into Dynamics 365 Business Central.

  2. Go to the Manage Profiles page.

    • Each user has a card to which you can attribute roles.

  3. Set the authorizations you want to give to the user.

  4. Next, you need to log in to the Azure portal using an admin user.

  5. Go to the App registrations and create a new registration for your user.

  6. Select a name, a supported account, and a redirect URI, then save.

  7. Back in the App registration page, select the new registration you just created.

  8. Go to the API permissions section and select all the API permissions needed for your application.

  9. Next, go to the Certificates & secrets section to create your own client secret.

    This new client secret can only be copied once so be sure to keep it note of it for later use.

  10. Once the application is created for the user, navigate to DataSync to start the setup of a new connector for Microsoft Dynamics 365 Business Central.

    By default, we allow usage of OAuth connection only for Cloud API, and accessKeys for On Premise API.

  11. Add a new connector with the properties listed below.

    After saving the connector, a page should open asking you to log in to your account. Once logged in, the callback should be done successfully and you can start working with your new connector.

Microsoft Dynamics 365 Business Central Connection Properties

Connection Properties Description
Description Enter a user given name to identify the connection in DataSync.
Organization URL

Microsoft Dynamics 365 Business Central supports several different endpoints to connect to data, with the two main categories being the Common Service endpoints, and the Web Services endpoints. Beyond that, each set of endpoints are split into Production and Testing endpoints.

The OrganizationUrl by default will attempt to resolve to a Common Service Production endpoint if any https://businesscentral.dynamics.com/ URL is specified. However, this may be configured by modifying the EndpointType.

Common Service Endpoints

Common Service endpoints contain the business data associated with Microsoft Dynamics 365 Business Central. For instance, accounts, sales orders, and sales invoices will all be found on the Common Service.

Common Service Endpoints - Production

https://api.businesscentral.dynamics.com/v2.0/{environment name}/api/v2.0

https://api.businesscentral.dynamics.com/v1.0/api/v2.0

https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0

Common Service Endpoints - Testing

https://api.businesscentral.dynamics.com/v2.0/{tenant id}/{environment name}/api/v2.0

https://api.businesscentral.dynamics.com/v1.0/{tenant id}/api/v2.0

https://api.businesscentral.dynamics.com/v2.0/{tenant id}/sandbox/api/v2.0

Note

The Tenant Id is the id of your tenant in Azure that the Business Central app is available on. This may be obtained by logging into portal.azure.com, selecting your user name, and going to Switch Directory. It may also be found under portal.azure.com, going to Active Directory, and Overview. Environment names may be found under https://businesscentral.dynamics.com/{tenant id}/admin.

Web Services Endpoints

Web Service endpoints include anything that has been custom exposed in Microsoft Dynamics 365 Business Central. This may include KPIs, reports, individual entites, or other feeds. In Microsoft Dynamics 365 Business Central, click the magnifying glass and search for Web Services to get an idea of what all are exposed by these endpoints.

Web Services Endpoint - Production

https://api.businesscentral.dynamics.com/v1.0/ODataV4/

Web Services Endpoint - Testing

https://api.businesscentral.dynamics.com/v1.0/{tenant id}/ODataV4/

Note

In order to use Web Services Endpoints, refer to Additional Connection Properties and include the EndpointType.

Custom API Endpoints

To connect to custom API endpoints you need to set the OrganizationUrl property to your custom base url which is in the format: https://api.businesscentral.dynamics.com/v2.0/{tenant}/api/{API publisher}/{API group}/{API version}

Company

Enter the name of your company as it is also written in your Microsoft Dynamics 365 Business Central API settings. This also acts as a schema in the API's context so it is recommended that you define it.

Directory (tenant) ID

This can be found in the overview of the app registration you created.

Authentication Mode

Select your authentication mode:

  • OAuth2

  • Basic (not available for Cloud version)

Callback URL

This field will already have a value. Copy it, and then go in your Azure portal. In App registration, select your Application that will be used for DataSync, and go in Manage Authentication section. Add a Web platform configuration with the Callback URL that was copied.

Client ID This can be found in the overview of the app registration you created.
Client Secret This is the client secret you created in step 9.

 

Additional Connection Properties Description
EndpointType

The type of endpoint the OrganizationUrl should resolve to.

Values

CSProduction, CSTesting, WSProduction, WSTesting