Applies to Product – Dynamics 365 Business Central
What’s happening?
The subscriptions created for the webhooks functionality in Business Central disappear shortly after being created, despite the expectation that they should remain active for three days.
Reason:
This of disappearing subscriptions in Business Central webhooks could be due to the response codes returned by the subscriber. If Business Central cannot reach the subscriber, it will attempt retries over the next 36 hours. The subscriber must respond with error codes 408 (Request Timeout), 429 (Too Many Requests), or any error in the 500-599 range (5xx). If the subscriber responds with any other code, such as 400 (Bad Request), the subscription will be deleted.
Resolution:
To troubleshoot this, follow these steps:
1. Check the Activity Log: Look for any stuck messages.
2. Empty the API Webhook Notification Aggregation table: Then restart the NST to clear cached jobs.
3. Run Codeunit 6154 manually: This codeunit is usually run in the job queue.
4. Check subscriptions:
Use the query select * from dbo.API Webhook Queue Entries.
Look for entries with "Job Queue Category Code" = APIWEBHOOK. Delete any existing entries, trigger the webhook, and check if a new entry is created.
5. Verify notification sending: Trigger the webhook and query select * from dbo.API Webhook Notification. Use a network traffic inspection tool to ensure data is sent to the Azure function.
If Business Central cannot reach the subscriber, retries will be attempted over the next 36 hours. The subscriber must respond with error codes 408, 429, or any 5xx range error. If a different error code is returned, the subscription will be deleted.
