Search code examples
azureazure-active-directoryazure-data-factorymicrosoft-dynamicsdynamics-business-central

How to use Azure Data Factory to take Business Central data and put into Azure SQL DB?


I am trying to use Azure Data Factory (ADF) to take data from Business Central (BC) and send it to the Azure SQL DB.

  • Within the BC portal, you can search for 'Web Services' at the top and you will be provided with a list of web services/ API URL's you can query to retrieve your data
  • In the list of web services, I have been using the Chart of Accounts endpoint as an example. See screenshots below:

Web Services (screenshot 1)

Web Services (screenshot 2)

I have not created an Active Directory App before, so am unsure if I am doing this in the best way.

Simply put, I just need the BC data in my DB... Can I do this a better way?


Solution

  • Authentication

    You need to use OAuth2 authentication to access the Business Central APIs/Web Services.

    For this you need an Azure App Registration and this App Registration needs to be created inside Business Central as well to be able to assign the correct permissions.

    Check the official guide on Setting up Azure Active Directory (Azure AD) based authentication for more information.

    APIs og Web Services

    I would also recommend that you use the APIs instead of the OData Web Services as the APIs are less subject to change and if/when changes are made versioning is used to ensure that existing integrations won't fail.

    You can find the available APIs and their endpoints in the official API Reference.