Setting up API automation requires two steps.
Before any configurations can be made in Business Central, the necessary settings must first be completed in Azure to enable communication with Business Central via web services.
All relevant configurations in Business Central can be managed directly through the API Automation Hub page.
Setup in Azure
Microsoft Entra Application
To make requests to Business Central via the API, another Entra application is required that has all the permissions for API automation.
After creating the Entra application in Azure, it is also necessary to create the Entra application in Business Central. (This is also described in the link)
Important: For API automation, it is important to add the permission set APIAPermissionsNVX as well as D365 READ.
Add the API Function Codeunit to Web Services
To publish the API endpoint of the API Automation, it is necessary to add the APIAFunctionsNVX Codeunit to the web services.
Navigate to the Web Services page
Click on + New
Use the following settings:
Object Type: Codeunit
Object ID: 64812
Service Name: APIAFunctionsNVX
Publish the endpoint by enabling the Published flag
The newly created web service should look like this:
Setup in Business Central
In the second step, further configurations are carried out in Business Central.
By using the Make technical setup action, an overview of all relevant configuration fields is displayed.
First, API automation is activated by enabling the Enable Endpoints flag.
Second, the Number of Records field allows you to define the maximum number of records per request. If this limit is exceeded, paging must be used.
If the field is left empty, a default limit of 20,000 records per request applies.