Skip to content

Business Central Setup

The superglue agent reads and writes Business Central data through the Business Central API v2.0, for example customers, vendors, items, sales and purchase documents, general ledger entries, journals, accounts and dimensions. superglue provides a managed Microsoft sign-in app for Business Central, so you do not have to create an app. You sign in with a Microsoft account that has access to the client’s environment.

This guide walks you through the setup, which takes a few minutes.

  • Runs as the signed-in user. All calls run as the Microsoft user who signs in. The agent can only see and change what that user’s Business Central permissions allow.
  • One environment per connection. The connection URL contains the environment name. A sandbox and a production environment need two connections.
  • Companies inside the environment. All data in Business Central belongs to a company. The agent lists the companies first and then works in the company you name.
  • Approval before writes. The agent reads freely. In the default Ask for permission mode, it asks before it changes data.
  • A Microsoft account with access to the environment. A Business Central user in the client’s Microsoft Entra tenant, with permissions for the data the project needs. Access to Dataverse or Dynamics 365 Sales alone does not give access to Business Central.
  • The environment name. Usually production or sandbox. The client’s Business Central administrator can tell you the exact name.
  • Consent for the app. The sign-in asks for the delegated Business Central permission Financials.ReadWrite.All. If the client’s tenant does not let users approve apps, a Microsoft Entra administrator of the client must approve it.
  • The company. The name of the Business Central company the project works in.
  1. Ask the agent to connect Business Central

    1. Start a session from the task, or click New session.
    2. Tell the agent which environment you need, for example: “Connect the client’s Business Central sandbox environment.”
    3. The agent asks for the environment name if you did not give it.
  2. Sign in with Microsoft

    1. The agent shows a connection card. Click the sign-in button on the card.
    2. In the Microsoft sign-in window, sign in with the account from the client’s tenant.
    3. Approve the requested permissions. If Microsoft asks for administrator approval, ask the client’s Entra administrator to approve it, then sign in again.
  3. Test the connection

    1. Tell the agent: “List the companies in this Business Central environment.” This request only reads data.
    2. If you get the company list back, the connection works.

Use your own app only when the client requires an app in its own tenant, or when your superglue deployment has no managed Business Central app. The recommended way is to let the agent create it.

  1. Let the agent create the app

    1. Tell the agent: “Connect Business Central with our own Microsoft Entra app.”
    2. Pick Do it in the browser. The agent asks for permission to use the browser.
    3. The agent opens Microsoft Entra in its browser, in the side panel. Sign in yourself when the agent asks. If Microsoft asks for multi-factor authentication, complete it in the browser. You can open the browser in full screen to do this.
    4. The agent registers the app, adds the redirect URI and the permission, creates a client secret, and saves the client ID and the secret to the connection itself. You do not copy the values.
    5. Sign in to Business Central on the connection card.
  2. Or create the app yourself

    1. In Microsoft Entra, register a new application.
    2. Choose Accounts in any organizational directory. Add a Web redirect URI. Copy the redirect URI from the connection card in superglue. On superglue Cloud, it is https://app.superglue.cloud/api/auth/callback.
    3. Under API permissions, add the delegated Dynamics 365 Business Central permission Financials.ReadWrite.All.
    4. Under Certificates & secrets, create a client secret.
    5. Copy the Application (client) ID and the secret value.
    6. Tell the agent that you have the credentials, and enter both values in the connection card. Do not paste them into the chat.

The sign-in requests the scopes https://api.businesscentral.dynamics.com/.default and offline_access.

  • Requests per user. Business Central allows 6,000 requests per user in a 5-minute window. It runs 5 requests of one user at the same time and queues the others. When the rate limit or the queue limit is reached, Business Central answers with 429 and asks the caller to wait.
  • Page size. One response can hold at most 20,000 records. Larger reads run page by page.
  • Request time. A request that takes longer than 8 minutes fails.
  • Batches. One batch holds at most 100 operations.
  • Updates. Business Central rejects an update that does not send the record’s current version, so the agent reads each record before it updates it.
  • Custom APIs. Extensions that publish their own API pages use a different path than the standard API. Tell the agent the publisher, group and version of the custom API.
  1. In superglue, open Connections, open the menu of the Business Central connection, and click Delete. This deletes the saved sign-in. It cannot be undone.
  2. To remove access on the client side, the client’s administrator can remove the app’s consent in Microsoft Entra, or disable the Business Central user.

Do I need to create an app in the client’s tenant?

Section titled “Do I need to create an app in the client’s tenant?”

No. superglue provides a managed Microsoft app for Business Central. You only sign in. The client’s tenant may still require administrator approval for the app.

Add one connection for each environment, and put the environment in the connection name, for example “Contoso BC sandbox”. Tell the agent which connection to use.

The agent sees fewer records than I expect. Why?

Section titled “The agent sees fewer records than I expect. Why?”

Business Central permissions can hide records without an error. Check the permission sets of the signed-in user, and check that the agent works in the right company.

Yes. One connection covers all companies in the environment that the user can access. Name the company in your request.