Setting up the dox42 D365 BC App

Prev Next
This step procedure is valid for dox42 Online.
See the MODUS documentation if you want to use dox42 D365 BC with dox42 Server. 

You need to configure an OAuth2 Authorization to authorize the use of the BC App within D365 BC and to call the dox42 Service.

Prerequisites

Steps

Accessing the dox42 Setup in BC

  1. Log in to your D365 BC account.

  2. Go to the cogwheel at the top right of Business Central, select the My settings menu and then the dox42 Administrator role.
    The BC Online home screen is reloaded.

  3. In the Actions section, open the Setup dropdown menu and select dox42 Setup.

    Note

    The setup is best done manually and not with the dox42 Setup Wizard.


    The dox42 Setup window opens.

    dox42 Setup window in BC

Creating a new authentication in BC

  1. Select the Configure Authentication tab.
    The Authorizations dialog opens.

    Authorizations dialog in the dox42 Setup

  2. Select the New button in order to create a new authentication.

  3. Enter a descriptive Code name, e.g. “yourCompany”, and a suitable Description for your new authentication in the respective text fields.

Configuring the Authorization Client Code

  1. Fill in the necessary information within the Authorization Client Code cell.

    1. To do so, click in the cell and select the New button:

      Creating a new Authorization Client Code

      The Authorization Clients dialog opens.

      Authorization Clients dialog

    2. Enter a descriptive Code name, e.g. “yourCompanyCLIENT”, and a suitable Description for your new authorization client code in the respective text fields.

    3. Click in the cell Client ID and Secret and select the outer three dots next to that cell.

      Client ID and Secret cell

      The Credential Dialog opens.

      Credential dialog

    4. Enter a Credential Name, e.g. “yourCompanySECRET”.

    5. Enter the Application (client) ID, which you have received during your app registration in Entra ID and which you may have copied to your Microsoft Excel web.config file.

    6. Enter the Client Secret, which you have added during your app registration in Entra ID and which you may have copied to your Microsoft Excel web.config file.

    7. Select Close to get back to the Authorization Clients dialog.

  2. Optional: Set an expiration date for your client secret.

Configuring the Authorization Resource Code

  1. Fill in the necessary information within the Authorization Resource Code cell.

    1. To do so, click in the cell and select the New button:

      Creating a new Authorization Resource Code

      The Authorization Resources dialog opens.

      Authorization Resources dialog

    2. Enter a descriptive Code name, e.g. “yourCompanyRESOURCE” .

    3. In the Resource cell, enter the Application (client) ID once again, which you have received during your app registration in Entra ID and which you may have copied to your Microsoft Excel web.config file.

    4. Click in the Tenant Code cell and select the New button.

      Creating a new Tenant Code

      The Authorization Tenants dialog opens.

      Authorization Tenants dialog

    5. Enter a descriptive Code name, e.g. “yourCompanyTENANT”, and a suitable Description for your new tenant in the respective text fields.

  2. Enter the Authorization Endpoint as well as the Token Endpoint, which you can retrieve from Entra ID.

    1. To retrieve this information, go to the Overview tab of your app registration in Entra ID and select the Endpoints tab.

      Overview of Azure App registration with highlighted endpoints for OAuth 2.0 authorization.

      Endpoints from the app registration in Microsoft Entra ID

    2. Copy the endpoints OAuth 2.0 authorization endpoint (v2) and OAuth 2.0 token endpoint (v2) to your clipboard and paste them into the corresponding cells.

  3. Select the OK button to get back to the Authorization Resources dialog.

  4. Enter .default in the Scope cell.

    Scope cell

  5. Select the OK button to get back to the Authorizations dialog.

Completing the authentication in BC

  1. Select the checkbox in the Active column in order to activate this new authentication.

  2. Verify if you have configured the OAuth2 Authorization correctly.

  3. Select the Close button to get back to the dox42 Setup window.

  4. In the Documents section, enter a SOAP URL in the Server URI text field, e.g. https://YourOnlineTenant.dox42.online/dox42service.asmx

  5. In the Documents section, select the newly created authorization from the OAuth2 Authorization Code dropdown menu.

    Completing the authentication in the dox42 Setup window

  6. Use the arrow button at the top of the screen to exit the window.

Result

You have configured an OAuth2 Authorization, which authorizes the use of the BC App within D365 BC.

Next step

Verify, if the configuration was successful.