Configure Webhook in Business Central

by | May 3, 2024 | Microsoft Dynamics 365, Business Central

Webhooks is the way to get notified if an entity changes in Dynamics 365 Business Central and it will create push request which is based on subscription. There is no need to write code to send a request to an end point.

Any system that subscribes to the webhook will be notified when a record is modified on the endpoint that they have set up when subscribing.

Any page of type API can be subscribed to without having to do anything extra.

Setup for Webhook

For Business Central Cloud you do not need to do anything to set up webhooks, however on-prem you will need to enable OData, API as webhook will only fire if the service tier that triggers the events has API enabled, so you will have to enable API on the service tier that the users access. All subscriptions are fired as a background job queue.

Create & Update Webhook Subscription

For creating the subscription in Business central, Post Request will be sent to create the subscription and will create a record in the table 2000000095 API Webhook Subscription.

It will be valid for three days, this can, however, be changed on-premises, after a subscription has expired you must renew it using a Patch Request.

Create & Update Webhook Subscription
Create & Update Webhook Subscription

 if a global trigger is called for a table that has a subscription, then it will create in Table 2000000096 API Webhook Notification and a background Task Scheduler will be run Codeuint 6154 API Webhook Notification Send which will notify all active subscribers by sending a JSON request to their endpoints which the subscriber can then use to call your API page.

BC Webhooks

User Permission for sending Webhook Notification

System will check following permission on the User who is updating the record in Business central and if it does not meet then notification will not be send to the active subscribers.

–  Write/Read permission on Job Queue Entry

–  Can create Task

– User Security Id exists in BC

– User’s license type is not Limited User

Get a free quote

Privacy

4 + 13 =

Related Posts