> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/accounting-and-erp/integrating-with-business-central.md).

# Integrating with Business Central

[Prerequisites](#prerequisites)

[Azure (Entra ID) App Registration](#a.-azure-entra-id-app-registration)

&#x20;      [Step 1: Register a new application](#step-1-register-a-new-application)

&#x20;      [Step 2: Copy Application ID and Tenant ID](#step-2-copy-application-id-and-tenant-id)

&#x20;      [Step 3: Add a Client Secret](#step-3-add-a-client-secret)

&#x20;      [Step 4: Add API Permissions](#step-4-add-api-permissions)

[Business Central Setup](#b.-business-central-register-the-app-and-assign-read-only-permission)

[Drivetrain Setup](#drivetrain-setup)

### Prerequisites

To connect **Business Central** to **Drivetrain**, you need:

1\. An **active Microsoft 365 account** with access to **Business Central** and **Azure**.

2\. Permission to register applications and grant admin consent in Azure (typically **Global** **Administrator or Application Administrator**).

3\. **Admin** privileges in Drivetrain.

### A. Azure (Entra ID) App Registration

#### Step 1: Register a new application

1\. Sign in to the [Azure portal](https://portal.azure.com/).

2\. Go to **Microsoft Entra ID > App registrations > + New registration.**

<img src="/files/xFSNFJzgNEO6nHAKtGa8" alt="" height="324" width="624">

3\. Fill in the following:

&#x20;   • **Name:** Drivetrain Integration (or any name you prefer)

&#x20;   • **Supported account types:** Select Accounts in this organizational directory only (Single tenant)

&#x20;   • **Redirect URI:** Leave blank. Drivetrain uses server-to-server authentication, which does not use a redirect.

4\. Click **Register**.

<img src="/files/uCGh4FLcWICgIaHwqNmP" alt="" height="313" width="624">

#### Step 2: Copy Application ID and Tenant ID

1\. On the app's Overview page, copy and save these two values. You will provide both to Drivetrain later:

&#x20;   • **Application (client) ID**

&#x20;   • **Directory (tenant) ID**

#### Step 3: Add a Client Secret

1\. In the left navigation, go to **Certificates & secrets > + New client secret.**

<img src="/files/jFc3RHD2v6T3aGFBYsp2" alt="" height="317" width="624">

2\. Fill in the following:

&#x20;   • **Description:** Drivetrain connector

&#x20;   • **Expires:** Pick a duration that fits your rotation policy (e.g., 24 months).

3\. Click **Add.**

4\. Immediately copy the **secret's Value** (not the Secret ID). It will not be shown again. This is the third value to share with Drivetrain.

<img src="/files/2YDvp7tl7mLacQtVa6uc" alt="" height="323" width="624">

#### Step 4: Add API Permissions

1\. In the left navigation, go to **API permissions > + Add a permission.**

<img src="/files/3JNx76cAnhyXJasztapS" alt="" height="319" width="624">

2\. Select **APIs my organization uses** (or Microsoft APIs, depending on your tenant) and search for Dynamics 365 Business Central and select it.

3\. Choose **Application permissions** (not Delegated).

4\. Tick `API.ReadWrite.All` and click **Add permissions.**

<img src="/files/av42Up2bfKhEKnFAyuiH" alt="" height="317" width="624">

5\. Back on the API permissions page, click **Grant admin consent for {your tenant name}**, then click **Yes** to **confirm**. The status column should turn green and read **"Granted for {tenant}".**

<img src="/files/OG4kY0faKmAu6paJJnUo" alt="" height="292" width="624">

{% hint style="info" %}
`API.ReadWrite.All` is the only **Entra-level permission** Microsoft publishes for the Business Central API surface. There is no separate read-only variant. By itself, it only allows the app to call the API. Whether it can read or write any actual data is controlled entirely by the Business Central permission set you assign in Section B. The Drivetrain app will be assigned a read-only permission set, so it cannot perform writes.
{% endhint %}

### B. Business Central - Register the App and Assign Read-Only Permission

{% hint style="warning" %}
This step is required. Azure consent alone does not grant the app any access to Business Central data.
{% endhint %}

1\. Sign in to **Business Central** as a user with permission to manage Microsoft Entra applications (typically a **SUPER user**).

2\. Use the search icon (Alt+Q) and search for Microsoft Entra Applications (older name: Azure Active Directory Applications). Open it.

3\. Click **+ New.**

4\. Fill in the following:

&#x20;   • **Client ID:** Paste the Application (client) ID from Step A2.

&#x20;   • **Description:** Drivetrain connector

&#x20;   • **State:** Enabled

5\. In the **User Permission Sets** section on the same page, click **+ New line** and assign the following:

&#x20;   • **D365 READ** - Grants read-only access across core Business Central tables.

6\. **Save** **the page.**

### C. What to Share with Drivetrain

Once both layers are configured, share the following three values with Drivetrain through a secure channel:

| Value         | Where to find it                                                            |
| ------------- | --------------------------------------------------------------------------- |
| Tenant ID     | Azure > App registrations > your app > Overview > "Directory (tenant) ID"   |
| Client ID     | Azure > App registrations > your app > Overview > "Application (client) ID" |
| Client secret | The Value you copied in Step A3                                             |

You will also separately tell Drivetrain:

&#x20;   • **Your environment name** (e.g., Production, or your sandbox name).

### Drivetrain Setup

#### Add the Business Central Connector

1\. Once you log in to Drivetrain, click on **+** to add a new connector on the **Data page.**

2\. Select **Microsoft Dynamics 365 Business Central** under the Accounting & ERP category.

3\. Enter the **Tenant ID**, **Client ID**, and **Client Secret** collected during the steps above and click **Next**.

<img src="/files/VZ5lSt9gOj9Y7PDYlVqJ" alt="" height="259" width="624">

4\. Enter the **Environment name** (optional, by default: Production) and click Next.

5\. Click **Finish setup** once the configuration is complete.

6\. Your **Business Central connection** will start showing up on the **Data page**. Once the sync is complete, you will be able to see your Business Central data on Drivetrain.

<img src="/files/b6cZr7URoBNlO4SwEQvw" alt="" height="331" width="624">


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/accounting-and-erp/integrating-with-business-central.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
