We have seen this issue since the beginning of last month, and we have not been able to get the webhook to work with Flow directly.
I created a temporary solution, where I made a NodeJS Server that would receive the webhook events and would then post to Microsoft Flow. Although this worked fine, this is not a solution we would like, since we would have to host our NodeJS Server. Note, when I opened up a POST request on my node server (using express via `app.post`, I noticed that JIRA would not send the events to me via the webhook. It didn't work until I used `app.all`, which means it would accept all requests (GET, PUT, POST, and DELETE). Once all requests were there, JIRA started to work fine.
Because we received this error on the Cloud product as well. This is when we tried to do this same thing on my self-hosted server. We noticed that it did the same thing when talking to flow directly. it gave the following error -- which I'm sure, the cloud version is doing the same. In the log found in "C:\Program Files\Atlassian\Application Data\JIRA\log\atlassian-jira.log", I found this error occuring everytime a new event occurs in JIRA:
2017-09-28 10:44:37,802 httpclient-callbacks:thread-1 WARN anonymous [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Client error - 401 when posting to web hook at 'https://prod--61-westus-logic-azure-com.mstools.apps.verisk.com:443/workflows/ba4f06a4bb9e447fa97020d0dd9a5aa5/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=j75YAyjbSkzTQ2iLA3ZU5H9rVDEMHpSH-2wSraNNDDc'
Steps to reproduce:
1. Create a webhook in JIRA
2. use this as the url for the webhook to POST to:
https://prod--61-westus-logic-azure-com.mstools.apps.verisk.com:443/workflows/ba4f06a4bb9e447fa97020d0dd9a5aa5/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=j75YAyjbSkzTQ2iLA3ZU5H9rVDEMHpSH-2wSraNNDDc
3. Select all checkboxes in the webhook config.
4. Click save
5. Create or update an issue in any board.
6. The logs should be displaying the error above
This is a very important thing to fix for us, since we do not want to host a "middle-man" application to integrate with JIRA. I have a few screenshots in the description, as well as the log file.