Webhook notifications are never sent ( BC14 CU16 on-premise)

Hello.

I have a Business Central version 14 with CU16 installed on premise.

My issue is that BC never sends notifications to my webhook endpoint. The subscription gets confirmed, but I never receive any notifications.

Currently, I only have a single webhook subscription on Items:

{
  "@odata.context": "https://bc14cu16.example.com:8112/BC_WS/api/beta/$metadata#subscriptions",
  "value": [
    {
      "@odata.etag": "W/\"JzQ0O1NxcUlZK215Z0lMTC9KM3ZROCtEQzFFZDVwRVJSbjRyZGpjZmt4L3QvaGM9MTswMDsn\"",
      "subscriptionId": "1805a065a9904b60a682574500704d0d",
      "notificationUrl": "https://outdated.eu.ngrok.io/api/v1/webhooks",
      "resource": "api/beta/companies(2afeb309-724c-4a5f-b628-136151b576e4)/items",
      "userId": "23b7e692-928d-4218-99da-e86b30558c7d",
      "lastModifiedDateTime": "2020-11-18T11:55:26Z",
      "clientState": "SADsA5rT2r1jT4wP",
      "expirationDateTime": "2020-11-21T11:55:26Z"
    }
  ]
}

I can renew and delete the subscription just fine.

Whenever I update an item or more, nothing is sent to the specified notification URL.

I only receive notifications when I create or renew a subscription.

I’ve had issues with this previously - with CU04, webhooks didn’t work. Spent a lot of time and money on a Microsoft Support ticket, just to learn that is was magically fixed somewhere between CU04 and CU10, since I got notifications while on CU10.

Now I’m on CU16 and now I don’t get any notifications any more. I don’t know if it related to the previous issue.

Anyone know how to resolve this issue?

Hi,

I just wanted to chime in and say that we’re experiencing this issue as well on version 17.0 on-premise. We’re able to create and confirm the subscriptions, and also patch and delete. But we cannot get Business Central to actually send any notifications. The network guys are monitoring the traffic, and they can’t see any traffic coming from Business Central. We’ve tested this on base application APIs and our own APIs.

And just to get the obvious pitfalls sorted out;

  1. We can see the APIs listed when posting a Get request to the webhookSupportedResources end-point

  2. We’re not using temporary tables as source tables in our APIs

  3. We’re using id as OData key

  4. We’ve checked the server instance that API subscriptions are enabled

  5. Access and authorization issues should be sorted out (firewall, logon etc)

At the moment we’re left with attempting to upgrade to version 17.1, but this obviously carries with it a cost and we’re not even sure it will work as I can’t see anything in the release notes from Microsoft suggesting they’ve done work on webhook subscriptions

Any help would be much appreciated

I’ve started a support case via the Microsoft Partner Portal. It seems like this is a reoccurring issue between major versions and cumulative updates.

I have to say that it’s rather scary that we can’t expect documented functionality to work.

We are on Business Central 14.16 (CU. 15) and I’m pretty sure we got it to work. Maybe my college [mention:6fde5babfb044ef9806f22864a0b7ace:e9ed411860ed4f2ba0265705b8793d05] (who did it) can help.

I would be happy to hear about his thoughts. Currently, the plan is to await a teams meeting with Microsoft Support as we seem to be stuck in a situation where it works as expected when they try it in their local environment, but not in our environment. So something must be different, I’m just unsure what it is.

Try to look into the webhook log for any registrations:

Hi, thank you for replying.

I just resubscribed to the endpoints to ensure that everything was up to date. I updated the display name of an Item.

The result of the call you’re suggesting is the following:

{
  "@odata.context": "https://bc14cu16.example.com:8112/BC_WS/api/microsoft/runtime/beta/$metadata#webhookLogs",
  "value": []
}

Thanks,

We upgraded the solution to version 17.1, but we still cannot get it working. We tried the webhookLogs and are getting an empty result same as you

I think I solved this on our part with help from AJ Kaufman’s article on how to test your webhook subscriptions (How to test Business Central webhooks – Kauffmann @ Dynamics 365 Business Central)

In his example I noticed that he published the “resource” element as “companies(2afeb309-724c-4a5f-b628-136151b576e4)/items” (using your data) and not prefixing it with “api/beta/companies…”

This doesn’t look to be how Microsoft shows it in their example, but changing this worked for me and I can see my notifications in Pipedream using Kaufman’s workflow template. The webhookLogs doesn’t seem to do any good in this regard, because I’m not getting any result there

I hope this helps and fixes your issue if you’re still struggling with it

Hello,

If the subscription is confirmed, then the webhook should be working.

See if notifications are stuck in the Job queue.

If they are stuck, then that is the problem.

In my case, was the docker.

By default, Docker has Task Scheduler disabled, not allowing Business Central Webhooks notification to be sent, getting stuck on the Job Queue Entries. To solve this conflict and allow Task Scheduler on already created Containers, run the following script as Administrator:

Invoke-ScriptInNavContainer -containername -scriptblock {

Set-NavServerConfiguration -ServerInstance BC -KeyName EnableTaskScheduler -KeyValue true

Set-NavServerInstance -ServerInstance BC -restart

}

tell me if it helped

How would I practically check this?

See in the BC the page JOB QUEUE ENTRIES