Skip to Content
Setup & ConfigurationAP Automation Client SetupBusiness Central Integration

Business Central Integration

Go to the Dynamics 365 Business Central portal at https://businesscentral.dynamics.com/.

Sign In to Business Central

Sign in using your admin account.

  1. Search for Microsoft Entra Applications.


Configure Microsoft Entra Applications

  1. Select Microsoft Entra Applications. Click New and enter the Client ID.


  1. In the AP Automation screen under General, set the State as Enabled.

  2. Set the D365 BUS PREMIUM under User Permission Sets.



Testing With Postman

Check that you can retrieve the company id. You will need the Postman API platform, to send a request to an API URL. It must be installed on your computer (download from https://www.postman.com). Follow the Postman documentation for installation instructions.

Open Postman to get started.

Get Access Token

We will first need the access token.

Follow these steps:

  1. From Postman, select the GET request.

  2. Type this URL (Substitute {{TenantID}} with your Tenant ID): https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/token

  3. Under the Body tab, select x-www-form-urlencoded. Fill out the keys with their corresponding values for:

  • grant_type : Specifies the type of OAuth 2.0 flow or grant that the application is using to obtain an access token.

  • client_secret : The client_secret is a confidential string credential that the application uses to prove its identity to Microsoft Entra ID.

  • client_id : Also known as Application ID or App ID, this is a unique identifier (GUID) assigned to your application when you register it in Microsoft Entra ID.

  • scope : This parameter defines the permissions and resources that the application is requesting access to on behalf of a user (delegated permission) or as itself (application permission).

Set the body to x-www-form-urlencoded:

Key Value 
grant_type client_credentials 
client_secret Your Client secret 
client_id Your Client ID 
scope https://api.businesscentral.dynamics.com/.default 
  1. Click the Send button. You will see the response in JSON format with the value of the access token (see image). You can find it in the response to the request sent. The response contains a key “access_token” with the value that you will need to get the company id.


You can save this in your Postman workspace (optional). Click the Save button at the top right-hand corner (you can also Share it if you prefer).

Get Company ID

We can now get the company id by using Postman.

  1. Select the GET request.

  2. Type the following URL (substitute {{Environment}} with the name of your environment e.g. production):

https://api.businesscentral.dynamics.com/v2.0/{{Enviroment}}/api/v2.0/Companies

Make sure that you also fill out the Body tab like in the previous step. Follow this guideline:

Set the body to x-www-form-urlencoded:

Key Value 
grant_type client_credentials 
client_secret From step 3 
client_id From step 3 
scope https://api.businesscentral.dynamics.com/.default 
  1. Under the Authorization tab, set the Token value with your access token value we retrieved from the earlier request.

  2. Click the Send button. You will see the response with the value of the company id (see image).



Last updated on