> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Business Central

## Overview

> [card] [Pre-built tooling](#pre-built-tooling)

> [card] [Pre-built integrations](#pre-built-integrations)

> [card] [Access requirements](#access-requirements)

> [card] [Setup guide](#setup-guide)

> [card] [Useful links](#useful-links)

> [card] [API gotchas](#api-gotchas)

## Pre-built tooling

> [accordion] ✅ Authorization
>
> | Tools | Status |
> | - | - |
> | Pre-built authorization (OAuth) | ✅ |
> | Credentials auto-refresh | ✅ |
> | Pre-built authorization UI | ✅ |
> | Custom authorization UI | ✅ |
> | End-user authorization guide | ✅ |
> | Expired credentials detection | ✅ |

> [accordion] ✅ Read & write data
>
> | Tools | Status |
> | - | - |
> | Pre-built integrations | 🚫 (time to contribute: \<48h) |
> | API unification | ✅ |
> | 2-way sync | ✅ |
> | Webhooks from Nango on data modifications | ✅ |
> | Real-time webhooks from 3rd-party API | 🚫 (time to contribute: \<48h) |
> | Proxy requests | ✅ |

> [accordion] ✅ Observability & data quality
>
> | Tools | Status |
> | - | - |
> | HTTP request logging | ✅ |
> | End-to-end type safety | ✅ |
> | Data runtime validation | ✅ |
> | OpenTelemetry export | ✅ |
> | Slack alerts on errors | ✅ |
> | Integration status API | ✅ |

> [accordion] ✅ Customization
>
> | Tools | Status |
> | - | - |
> | Create or customize use-cases | ✅ |
> | Pre-configured pagination | 🚫 (time to contribute: \<48h) |
> | Pre-configured rate-limit handling | 🚫 (time to contribute: \<48h) |
> | Per-customer configurations | ✅ |

*No pre-built syncs or tools available yet.*

> [!TIP]
>
> Not seeing the integration you need? [Build your own](https://nango.dev/docs/guides/functions/functions-guide.md) independently.

## Access requirements

| Pre-Requisites | Status | Comment |
| - | - | - |
| Paid dev account | ✅ Not required | Free, self-signup for a [Microsoft account](https://account.microsoft.com/account) and [Azure account](https://azure.microsoft.com/free). |
| Paid test account | ✅ Not required | Free Microsoft account can be used for testing. |
| Partnership | ✅ Not required | |
| App review | ⚠️ Conditional | Required only if you want to publish your app to the Microsoft commercial marketplace or if your app needs admin consent for certain permissions. |
| Security audit | ✅ Not required | |

## Setup guide

*No setup guide yet.*

> [!TIP]
>
> Need help getting started? Get help in the [community](https://nango.dev/slack).

> [!NOTE]
>
> Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/microsoft-business-central.mdx)

## Useful links

| Topic | Links |
| - | - |
| General | [Microsoft Entra Admin Center](https://entra.microsoft.com) |
| | [Azure Portal](https://portal.azure.com) |
| Developer | [Microsoft identity platform documentation](https://learn.microsoft.com/en-us/entra/identity-platform/) |
| | [How to register an Application](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/automation-apis-using-s2s-authentication#task-1-register-a-microsoft-entra-application-for-authentication-to-business-central) |
| | [OAuth related documentation](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/automation-apis-using-s2s-authentication) |
| | [Microsoft Authentication Libraries (MSAL)](https://learn.microsoft.com/en-us/entra/identity-platform/msal-overview) |
| | [Microsoft Business Central REST API documentation](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/api-overview) |

> [!NOTE]
>
> Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/microsoft-business-central.mdx)

## Common Permissions

| Permission | Description |
| - | - |
| Financials.Read.All | Read all financial data (no user sign-in required) |
| user\_impersonation | Access as the signed-in user |
| AdminCenter.ReadWrite.All | Full access to Admin Center API |
| Automation.ReadWrite.All | Full access to automation |
| API.ReadWrite.All | Full access to web services API |

## API gotchas

* See particularly the `tenantId` parameter under [Get a token](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow#get-a-token).
* When requesting **Application Permissions** that require admin consent, an Microsoft Entra ID administrator must pre-authorize the permissions. Without admin consent, the app cannot obtain tokens for those scopes.
* For multitenant applications, each tenant administrator must grant consent to the app's required permissions before access is granted in their tenant.
* The [.default scope](https://learn.microsoft.com/en-us/entra/identity-platform/scopes-oidc#default-when-the-user-gives-consent) is a special scope that tells Azure AD to issue a token containing all the **Application Permissions** that have already been granted (consented) for your app on that resource. Using `.default` ensures your app receives permissions consistent with those configured and consented at the tenant or organization level.
* The `.default` scope can't be combined with the scopes registered in the Azure portal. So either just use the `.default` scope or remove it to list out explicit parameters that are required. If you attempt to combine them you'll receive the following error

```
.default scope can't be combined with resource-specific scopes
```

* To add the `.default` scope when creating a connection, use the `integrations_config_defaults` parameter in `createConnectSession`:

```typescript theme={null}
const { data } = await nango.createConnectSession({
  tags: {
    end_user_id: '<END-USER-ID>',
    end_user_email: '<END-USER-EMAIL>',
    organization_id: '<ORGANIZATION-ID>'
  },
  integrations_config_defaults: {
    "microsoft-business-central": {
      connection_config: {
        oauth_scopes: "https://api.businesscentral.dynamics.com/.default",
      },
    },
  },
});
```

* No user interaction is involved when using the Microsoft Business Central provider. Therefore, a Microsoft Entra ID administrator must grant consent for the required **Application Permissions** ahead of time. This can be done through the [Azure Portal](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal) or by using the [admin consent endpoint](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent?pivots=ms-graph).
  \[!NOTE] Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/microsoft-business-central.mdx)

## Going further

> [card] [Connect to Microsoft Business Central](https://nango.dev/docs/integrations/all/microsoft-business-central/connect)
>
> Guide to connect to Microsoft Business Central using Nango Connect UI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.