Azure DevOps Service Hooks

In this tutorial, I will be integrating Azure DevOps to Azure Service Bus using Service Hooks. This can be useful when you wanted to be notify on certain events happened on your project work item.

What are Service Hooks

Service Hooks are user defined http callback that are triggered by a Event, for example, you can setup a Service Hook to Azure Service Bus or any supported messaging platform to send an http post containing the event information in a interchangeable data format like Json (JavaScript object notation).

Prerequisites

Azure DevOps Subscription (You can subscribe for free Basic Plan if you don’t have one)
Fully Configured Azure Service Bus

Lets Get Started

Navigate to Organization Settings page and then Click the Service hooks link under General section. The page should display all available process. Click the ellipsis to Create inherited process.

Service Selection: Select Azure Service Bus on the list and hit Next button as we will be using Service Bus Queue on the later steps.

Trigger Configuration: On this section, we will be selecting "Work item updated" event, work item Task filter and Work Date field filter.

It's a rule of thumb in configuring trigger is to be more specific in terms of setting up your filters. As this may inhibit the accuracy of the event you most care to be notified and it may cause degraded Azure DevOps performance due to excessive trigger invocation on the backend.

Action Configuration: On this section, we will be selecting "Send a message to a Service Bus Queue" action, Under settings SAS connection string, Queue name value needs to be entered, You can get SAS connection string value in Azure Portal Namespace Shared Access policies.

On this example, I will be setting to send the resource details as non-serialized string or in a plain text format.

Test your Action, on the same section you can test and immediately get your result to see if your integration works properly, on the new modal view the Request json content and Azure Service Bus response.

Continue reading on Consuming Azure Service Bus Message Queue in Azure Function Application for Azure DevOps integration topic.

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.