Set up Dynamics 365 Business Central

Dynamics 365 Business Central is a business management application designed for medium-sized businesses. From one application, businesses can monitor and manage their accounting processes, financial performance, supply chain, sales and marketing processes, and project delivery.

Before you can access data from customers using Dynamics 365 Business Central for their accounting, you need to set up a Dynamics 365 Business Central integration in the Codat Portal. You'll need to:

  • Register and configure your Dynamics 365 Business Central application, and retrieve your secure keys.
  • Add your secure keys to the Codat Portal.
  • Enable your Dynamics 365 Business Central integration in the Codat Portal.

We also recommend that you test your integration using a trial, Dynamics 365 Business Central account.

Register your application

Register your Dynamics 365 application on the Azure portal.

  1. Go to the Azure portal and sign in.

📘

Dynamics 365 Business Central and Azure account details

If you already have a Dynamics 365 Business Central account, use these account details. If you don't, create an account before continuing.

To gain access to any Azure configuration that your company has already set up, for example, user authentication, enter your company email address when you sign up. If your organisation is using Azure Active Directory (Azure AD) to control access to Dynamics 365 Business Central, ask your Azure AD administrator to add your account to the correct group.

If you're unable to sign up for a new account, contact your Dynamics 365 Business Central administrator. They may have disabled this feature.

  1. When you've signed in successfully, from the left or in-page menu, select Azure Active Directory. If you can't see this entry on the landing page, under Azure services, select More services and then select Azure Active Directory.
    Details of the tenant that your account is connected are displayed.
  2. You might have been granted access to more than one tenant, so check the details are correct. If they're incorrect, select Switch tenant and choose the right one.
  1. From the left, or in page menu, select App registrations, and then select + New registration.
  1. Add the following details:
  • In the Name box, enter a short name for your application. Your customers see this when they authorise your connection to their accounting system.
  • Under Supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox), which allows Codat to access data in Dynamics 365 Business Central.
  • Under Redirect URI, select Web and then enter either:
    • https://dynamics365businesscentral-uat.codat.io/oauth/callback if your Dynamics 365 Business Central integration is still in UAT.
    • https://dynamics365businesscentral.codat.io/oauth/callback if your Dynamics 365 Business Central integration is already live in Production.
  1. Select Register.
    Azure registers your application details and generates your client ID. You'll need this later, so either copy the details or keep this page open in a separate browser tab. The client ID will not be displayed after you leave this page.

Next, generate and retrieve your client secret.

  1. Still in the Azure portal, in the left menu, select Certificates & secrets.
  2. Under Client secrets, select + New client secret.
  3. In the Add a client secret dialog box, update the following:
  • In the Description box, enter a short description for your client secret to make it easier to find.
  • Under Expires, select the most appropriate option that complies with your company's security policy.
  1. Select Add.
    Your client secret is generated and displayed at the bottom of the page. The Secret Value won't be displayed again in full so copy the value down.

Now, update the access permissions for your application, which control the data that your app can access in Dynamics 365 Business Central.

  1. In the left menu, select API permissions.
  2. Under Configured permissions, select + Add a permission.
  3. In the Request API permissions pane, scroll down and select Dynamics 365 Business Central.
  4. Select Delegated permissions along with the first two listed permissions:
  • user_impersonation
  • Financials.ReadWrite.All.
  1. Select Add permissions.
  2. Now, above the listed permissions, select Grant admin consent for Default Directory, and select Yes to confirm your change. This option may not be available for all subscription types.
  3. Your Dynamics 365 Business Central application set up is complete.

Add your secure keys to the Codat Portal

📘

Use the correct Codat portal

You need to add the secure keys to the correct Codat environment:

To add your secure keys.

  1. Go to the correct Codat environment and log in.
  2. Go to Integrations > Accounting.
  3. Scroll down the list until you find Dynamics 365 Business Central, and select the Manage button next to it.
  4. Copy and paste the Client ID and Client Secret values from registration.
  5. Select Save to complete your integration set up.

Enable your Dynamics 365 Business Central

  1. In the Codat Portal, go to Integrations > Accounting.
  2. Scroll down the page until you find Dynamics 365 Business Central and select the toggle to set it to Enabled.

Your Dynamics 365 Business Central integration is now set up.

Test your integration

We recommend that you test your integration before sending Link URLs to customers.

🚧

Dynamics 365 Business Central extension

We recommend that you mention this to your customers before you begin to link their accounts.

During the linking process, Codat installs a Dynamics 365 Business Central extension:

  • Description/Publisher: Codat
  • Name: App Link.

If the latest version of this extension is uninstalled or unpublished, Codat is unable to retrieve all the required data from the accounting platform.

Under certain circumstances, the extension may take a few minutes to install, and while it completes, fetch errors may temporarily occur.

  1. Sign in to the Dynamics 365 Business Central account you added earlier or create a new one.
  2. Create some data within the application, for example, some invoices.
  3. In the Codat portal where you've enabled your integration, create a test company.
  4. Search for your test company, and next to the company name, select View Link URL.
  5. Use the Link URL to connect your Microsoft Dynamics 365 account.
    • When the link site opens, select Microsoft Dynamics 365 Business Central, and then select Continue to Dynamics 365 Business Central.
    • Log in to your Dynamics 365 account.
    • Authorise access to your account details and select your test company.

🚧

Depending on the end user's AD settings for Dynamics 365 they may need the connection to your app to be approved by an admin of their AD. If this is the case the user will be guided to request access and the admins will be notified (If the user making the connection is an admin they will not need to request access). Once approved the user can run through the link flow process again to complete the connection to your app.

🚧

Multiple environment selection (Sandbox and Production)

During linking, when you select a company that is available in a sandbox or production environment, the environment name is also displayed. This feature allows:

  • You to organise your Dynamics 365 Business Central data into multiple production environments.
  • You and your customers to make sure that the correct environment is used when linking companies.

According to your access level, a company called Cronus may also be available for selection. This is a Microsoft test company populated with sample data.

  1. Make sure that any data for your test company is displayed in Codat Portal.

To learn more about how Dynamics 365 Business Central handles certain data types, and how this affects the data available in Codat, see Data handling in Dynamics 365 Business Central.


Did this page help you?