Linking Microsoft Dynamics 365 Business Central as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Alpha release

This source is currently in alpha. The interface and available tables may change.

The Microsoft Dynamics 365 Business Central connector syncs companies, accounts, bank accounts, and more into the PostHog data warehouse, so you can analyze them alongside your product data.

Prerequisites

Credentials that can read the data you want to sync. PostHog only reads data, so read access is enough.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

Sync your Business Central customers, vendors, items, documents and general ledger entries.

Register an app in Microsoft Entra ID and grant it the API.ReadWrite.All application permission with admin consent, then add it as a Business Central user in the environment you want to sync. Enter that app's client ID and secret below, along with your Entra tenant ID and the environment name (usually production).

Every table except companies is synced for all companies in the environment, with the company ID kept on each row.

You'll be asked for:

  • Microsoft Entra tenant ID: for example 00000000-0000-0000-0000-000000000000.
  • Environment name: for example production.
  • Application (client) ID: for example 00000000-0000-0000-0000-000000000000.
  • Client secret

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

All Microsoft Dynamics 365 Business Central tables are full refresh. Each sync replaces the contents of the table.

Configuration

OptionTypeRequired
Microsoft Entra tenant IDtextYes
Environment nametextYes
Application (client) IDtextYes
Client secretpasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
companies

A company (legal entity with its own books) inside a Business Central environment.

Full refresh——
accounts

A general ledger account from the company's chart of accounts.

Incremental, Full refreshlastModifiedDateTime—
bankAccounts

A bank account the company reconciles payments against.

Incremental, Full refreshlastModifiedDateTime—
currencies

A currency the company can transact in, with its rounding rules.

Incremental, Full refreshlastModifiedDateTime—
customers

A customer the company sells to, with its balance and default posting setup.

Incremental, Full refreshlastModifiedDateTime—
dimensions

An analysis dimension (for example Department or Project) used to tag ledger entries.

Incremental, Full refreshlastModifiedDateTime—
dimensionValues

One allowed value of an analysis dimension.

Incremental, Full refreshlastModifiedDateTime—
employees

An employee registered in the company, used for time and expense posting.

Incremental, Full refreshlastModifiedDateTime—
itemCategories

A category used to group items in the item list.

Incremental, Full refreshlastModifiedDateTime—
items

An inventory or service item the company sells, with cost, price and stock level.

Incremental, Full refreshlastModifiedDateTime—
paymentMethods

A payment method that can be set on customers, vendors and documents.

Incremental, Full refreshlastModifiedDateTime—
paymentTerms

A set of payment terms controlling due dates and early-payment discounts.

Incremental, Full refreshlastModifiedDateTime—
shipmentMethods

A shipment method (delivery terms) that can be set on customers and documents.

Incremental, Full refreshlastModifiedDateTime—
unitsOfMeasure

A unit of measure items can be counted, sold and purchased in.

Incremental, Full refreshlastModifiedDateTime—
vendors

A vendor the company buys from, with its payable balance and posting setup.

Incremental, Full refreshlastModifiedDateTime—
locations

A warehouse or site inventory can be stored at and shipped from.

Full refresh——
salesInvoices

A sales invoice header, draft or posted, with its totals and customer.

Incremental, Full refreshlastModifiedDateTime—
salesInvoiceLines

A line on a sales invoice: the item, resource or account being invoiced.

Full refresh——
salesOrders

A sales order header, with its customer, totals and fulfilment status.

Incremental, Full refreshlastModifiedDateTime—
salesOrderLines

A line on a sales order: what is ordered, at what price, and how much has shipped.

Full refresh——
salesQuotes

A sales quote header offered to a customer or contact.

Incremental, Full refreshlastModifiedDateTime—
salesQuoteLines

A line on a sales quote: what is being offered, at what price.

Full refresh——
salesCreditMemos

A sales credit memo header crediting a customer for returned or over-invoiced goods.

Incremental, Full refreshlastModifiedDateTime—
salesCreditMemoLines

A line on a sales credit memo: what is being credited back to the customer.

Full refresh——
purchaseInvoices

A purchase invoice header received from a vendor, with its totals.

Incremental, Full refreshlastModifiedDateTime—
purchaseInvoiceLines

A line on a purchase invoice: the item, resource or account being purchased.

Full refresh——
generalLedgerEntries

A posted general ledger entry — the append-only record of every amount hitting a G/L account.

Incremental, Full refreshlastModifiedDateTime—
customerPayments

A customer payment journal line recording money received against invoices.

Incremental, Full refreshlastModifiedDateTime—

Troubleshooting

  • If the connection fails with an authorization error, the client secret is wrong, expired, or has been revoked. Create a new one, then reconnect the source.
  • If a table syncs no rows, the credential may not have access to that data. Check its permissions, then reconnect the source.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?