Skip to main content
Install the AGR data integrator

Follow these steps to install the AGR data integrator for BC 17 or newer.

Updated over a week ago

This information is for Microsoft Dynamics Business Central versions 17 and higher.

Overview

This guide provides instructions on installing the AGR Data Integrator for BC. The extension is fully integrated with Microsoft Dynamics 365 Business Central and is certified by App Source, which guarantees that it meets the strictest quality standards required by Microsoft.

The solution creates REST APIs to connect to AGR and allows BC to seamlessly send and receive data between the two programs.

Using OAuth or Basic Auth through Azure provides authentication. The endpoints created can be found in BC after installation by opening the Web Services page and filtering on AGR.

1. Installation

Download the AGR Data Integrator file for your BC version below, and install it into Business Central.

Once the status for the app in Extension Management reads installed, it can be set up to communicate with AGR Essentials. To finish setting up the AGR Data Integrator, make sure to have all necessary connection information on hand.

2. Setup

The AGR Data Integrator can be set up through the AGR Data Integrator page in BC.

2.1 Order Creation (Optional)

Purchase Order No. Series:

This field determines Number Series used when purchase orders are created from AGR orders. If left empty, purchase orders will be created according to the default logic defined in the Purchases & Payables setup in Business Central. If needed, you can override the numbers series used for creating purchase orders by selecting a value from the dropdown.

Transfer Order No. Series

This is the Number Series used when transfer orders are created from AGR Orders. You can either create a new number series for AGR Orders or use the number series that is defined in the Inventory setup.

3. Configure OAuth authentication

AGR supports OAuth and basic authentication!

If you are unable to configure OAuth authentication for BC on-premise, you can skip this step and create Basic authentication credentials instead. See 3. Configure Basic authentication (alternative).

AGR uses Service-to-Service (S2S) Authentication to integrate with Business Central. You can read more about S2S Authentication in a Microsoft article that provides more details on the information below.

3.1. Register the app in Azure

  1. In the Azure portal, find and open App Registrations

2. Select New registration.

3. Fill in the details as pictured below and select Register at the bottom of the page

4. Find the newly created app registration.

5. Open the overview page.

6. Copy the Application (client) ID and store it for later.

3.1.1 Create a client secret

  1. Select Certificates & Secrets on the left.

  2. Select New client secret.

  3. Give the secret a description and an expiry date

  4. Click on Add.

  5. Copy the value and store it. You will need to give AGR this value.

Note!

This is the only time the secret is visible, so copy it now. Once the secret expires, AGR will no longer have access to BC and you will need to create a new client secret.

3.1.2 Grant API permissions

  1. Select API permissions on the left.

  2. Select Add a permission.

  3. Find Dynamics 365 Business Central.

  4. Select Application Permissions.

  5. Under API, select API.ReadWrite.All.

  6. Select Add permissions to apply the changes.

  7. Select Grant admin consent to apply consent

3.1.3 Add a redirect URI

  1. Select Authentication on the left.

  2. Set a Redirect URL. The default is to add both https://api.businesscentral.dynamics.com and https://businesscentral.dynamics.com. These values may differ depending on the business setup.

3.2. Permissions in BC

The next step is to provide permissions through Business Central.

  1. Open the Microsoft Entra Applications (previously named Azure Active Directory Application) in BC.

2. Click new.

3. Provide a description, such as AGR authentication.

4. Set the Client ID as the Application (client) ID from the app registration created previously. You can find the value again by going to the Azure portal > App registrations and opening the app.

5. At the bottom of the screen in User Permission Sets, provide the permission set ORI AGR DATA INTEGR and select the Company Name that AGR will connect to.

Note

For BC 17 or older, permission set ORI AGR DATA INTEGR does not apply. Instead, add the following permission sets: AGR Data Integrator, D365 BASIC, D365 PURCH DOC (Edit), D365PREM MFG (Edit), D365 WHSE (View), Inventory Transfer (Edit), Receivables Documents (View)

The page should look something like this after it has been set up.

3. Configure Basic authentication (alternative)

Important

This step is an alternative to step 3. Configure OAuth authentication, for scenarios where Oauth authentication cannot be configured. If you have already configured Oauth, you can skip this step.

To configure Basic authentication for AGR to access BC, add a new user to BC and add the ORI AGR DATA INTEGR permission set to the user:

3.1 BC instance configuration?

It is important that the BC instance is connected to the Live BC database, and that it has the following configuration:

  • Credential Type: NavUserPassword

  • Enable Add-in Annotations: True

  • Enable API Services: True

  • Enable OData Services: True

4. Provide AGR with the needed information

Provide the following information to AGR. You can send this via email to your AGR contact with the subject "OAuth information to connect AGR to BC".

Be careful when sharing sensitive data, e.g. passwords. When sharing via email, we recommend generating a one-time link using 1ty.me.

  • The Application (client) ID of the app, created in step 3.1

    • If using Basic authentication, then send User Name instead

  • The Secret value from step 3.1.1

    • If using Basic authentication, then send password instead

  • Copy and send the values that are shown when Show Order API URL and Show Item API URL are clicked on the AGR Data Integrator page in BC.


Did this answer your question?