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

# Microsoft Business Central - How do I link my account?

# Overview

To authenticate with Microsoft Business Central, you need:

1. **Tenant ID** - The unique identifier for your organization that uses Microsoft services.
2. **Enrivonment Name** - The environment name to your organization.
3. **Client ID** - The unique identifier that Azure assigns to your application when it's registered.
4. **Client Secret** - A unique string that enables the client application to access Microsoft Business Central.

This guide will walk you through generating and finding these credentials within Azure and Microsoft Business Central.

### Prerequisites:

* You must have an Azure account with an active Microsoft Business Central subscription.

### Instructions:

#### Step 1: Finding your Tenant ID

1. Your Tenant ID can be found in the **Tenant ID** field on the [Overview page](https://aad.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview) within your Azure account.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/tenant_id.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=b3bdcba97aa7f22289d8418b54d0f60d" width="3024" height="984" data-path="integrations/all/microsoft-business-central/tenant_id.png" />

#### Step 2: Finding your Enrivonment Name

1. Your Enrivonment Name can be found in the **Environments tab** of the Business Central administration center account.

#### Step 3: Generating your Client ID

1. Navigate to the [Azure portal home page](https://portal.azure.com/#home) and sign in using the credentials of an administrator.
2. Select **App registrations**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/app_registration.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=d8144bf0d4cfb15dcb3af69554d0857c" width="3024" height="1372" data-path="integrations/all/microsoft-business-central/app_registration.png" />

3. Select **New registration**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/new_registration.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=85ee595a619cf5fcb9907b5416753ae9" width="3024" height="1372" data-path="integrations/all/microsoft-business-central/new_registration.png" />

4. In the **Register an application** section, enter a meaningful application name to display to users. Select who can use this application based on your environment and click **Register**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/register_new_app.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=4a20a2117c23ebb40ac87b7b89e5d916" width="3024" height="1404" data-path="integrations/all/microsoft-business-central/register_new_app.png" />

5. Once you have registered your application, your **Client ID** will be displayed in the **Application (client) ID** field within the **Essentials**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/client_id.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=ea35fdab3a79f1c67f86c78b89637530" width="3024" height="1404" data-path="integrations/all/microsoft-business-central/client_id.png" />

6. Go to **Authentication**, click **Add a platform**, and select **Web**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/authentication.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=907989aa80ce5ff0657decd3e5d6685f" width="3024" height="1462" data-path="integrations/all/microsoft-business-central/authentication.png" />

7. Set the redirect URI: **[https://businesscentral.dynamics.com/OAuthLanding.htm](https://businesscentral.dynamics.com/OAuthLanding.htm)**, then click **Configure**.

#### Step 4: Generating your Client Secret

1. After registering a new app in the [step](#step-3-generating-your-client-id) above, you can now generate a client secret for that specific application. Navigate to **Certificates & secrets** under **Manage**, and click **New client secret**.
2. A pop-up modal will appear, prompting you to enter your secret's **Description** and **Expires** values. Fill these then click on **Add**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/client_secret.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=aa1bdb405e5dbeb5b9311dc79446cb9d" width="3024" height="1404" data-path="integrations/all/microsoft-business-central/client_secret.png" />

3. Once completed, your **Client Secret** will be generated. This value can be found in the **Value** field within the **Client Secrets** table.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/gen_client_secret.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=108c6efebfb179681563c9a3f0ab9310" width="3024" height="1404" data-path="integrations/all/microsoft-business-central/gen_client_secret.png" />

4. After generating the **Client Secret**, you must grant the registered application the necessary permissions for **Dynamics 365 Business Central**. To do this, navigate to **API permissions**, select **Add a permission**, and choose **Dynamics 365 Business Central**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/permissions.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=8463c4b506ecaba4a59ae5b35824cae9" width="3024" height="1404" data-path="integrations/all/microsoft-business-central/permissions.png" />

5. Select **Application permissions**, choose the required permissions, and then click **Add permissions**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/app_permissions.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=3c379822fdd4bea5ad675ae3efe5c493" width="1714" height="1478" data-path="integrations/all/microsoft-business-central/app_permissions.png" />

6. Grant admin consent for the selected permission by choosing it from the list and then clicking **Grant admin consent for your specific tenant name**.

* After setting up the app above, we need to Configure service-to-service authentication for the Azure AD application in Business Central.

7. Login to your **Business Central** client, search for **Microsoft Entra Applications**, open the page, and click **New**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/ms_entra_business_central.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=89bba2802481ef83ca9524401345a36e" width="3024" height="1462" data-path="integrations/all/microsoft-business-central/ms_entra_business_central.png" />

8. In the opened screen, enter the **Application (Client) ID** to the **Client ID** field. This is the Azure AD application ID that you obtained at [step 2](#step-3-generating-your-client-id) above.
9. Fill in the **Description** field. If this application is set up by a partner, please enter sufficient partner-identifying information, so that all applications set up by this partner can be tracked in the future.
10. Set the **State** to **Enabled**.
11. Give a permission set or assign a user group.
12. (Optional) - If you didn´t grant admin consent from Azure you can do it here as well by selecting **Grant Consent**.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/grant_consent.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=bdd1c9a21d21f04380f55cd73b9beaef" width="1934" height="342" data-path="integrations/all/microsoft-business-central/grant_consent.png" />

Once you have your credentials:

1. Open the form where you need to authenticate with Microsoft Business Central.
2. Enter the **Tenant ID**,  **Enrivonment Name**, **Client ID** and **Client Secret** in their designated fields.
3. Submit the form, and you should be successfully authenticated.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/DVrtJn_EDMUDVpWS/integrations/all/microsoft-business-central/form.png?fit=max&auto=format&n=DVrtJn_EDMUDVpWS&q=85&s=1b6090494a0dddf6691add432cfa8ef8" style={{maxWidth: "450px" }} width="1000" height="1394" data-path="integrations/all/microsoft-business-central/form.png" />

You are now connected to Microsoft Business Central.
