Integrate with service hooks
TFS 2018
Service hooks let you run tasks on other services when events happen in your project in Azure DevOps.
For example, you can create a card in Trello when a work item gets created or send a push notification to your team's mobile devices when a build fails. You can also use service hooks in custom apps and services as a more efficient way to drive activities when events happen in your projects.
How do service hooks work?
Service hook publishers define a set of events that you can subscribe to. Subscriptions listen for these events and define actions to take based on the event.
Subscriptions also target consumers, which are external services that can run their own actions when events occur.
Available services
The following services are available as the target of service hooks. For more information about other apps and services that integrate with Azure DevOps, go to the Visual Studio Marketplace.
Service | Supported events | Supported actions |
---|---|---|
App Center | Work item updated | Send notification |
AppVeyor | Code pushed | Trigger an AppVeyor build |
Azuqua | All | Post event to FLO |
Azure App Service | Code pushed | Deploy web app |
Azure Service Bus | All | Send a message to a Notification Hub, Service Bus Queue, or Service Bus Topic |
Azure Storage | All | Insert a message in a Storage Queue |
Bamboo | Build completed, Code pushed | Queue a build |
Campfire | All | Post a message to a room |
Datadog | All | Post an event in Datadog |
Grafana | Release deployment completed | Add annotation to Grafana database |
HipChat | (No longer supported) | |
HockeyApp | Work item updated | Send notification |
Jenkins | Build completed, code pushed, PR merge attempted, release deployment completed | Trigger generic or Git build |
Microsoft Teams | All | Post a message to a channel |
MyGet | Build completed, code pushed | Publish NuGet package to MyGet, trigger a MyGet build |
Office 365 | All | Post a message to a group |
Slack | All | Post a message to a channel |
Trello | All | Create a card or list |
UserVoice | Work item created or updated | Send linked work item event |
Web Hooks | All | Post via HTTP |
Workplace Message Apps | All | Send notifications |
Zapier | All | Send notification |
Zendesk | Work item commented on | Create a private comment in a ticket |
Create a subscription
When you integrate one of these services with Azure DevOps, you must create a new subscription. In many cases, you need to do some work in the other service, too. For specific details, check out the information on the service that you're interested in.
Open the admin page for a project in web access.
Create a subscription by running the wizard.
Select the service you want to integrate with.
Select the event to trigger on and any filters (if applicable).
Select an action to run on the target service.
Note
The list of available actions may be limited based on the event type you selected.
To confirm the settings are correct, test the subscription and then finish the wizard.
FAQs
Q: What permissions do I need to set up a subscription?
A: Edit subscriptions and View subscriptions. By default, only project administrators have these permissions. To grant them to other users directly, you can use the command line tool or the Security REST API.
Q: What are the security implications of granting Edit subscriptions and View subscriptions permissions?
A: The user with these permissions can see all subscriptions created in the project and the notification history for those subscriptions. That user can then create any type of service hook subscription in that project. If the user sets up a subscription for a resource that they don't otherwise have permission to access, the subscription won't get triggered.
For example: If you don't have access to work items in area path XYZ, and you set up a subscription to the work item update events, you don't get notifications for updates to work items in area path XYZ. But, if another user, who does have access to the work items in area path XYZ, receives those "work item update" events, then you could see the notification history of the other user's events, which includes work item data that you don't otherwise have access to.
Q: Can I create service hook subscriptions for a project programmatically?
A: Yes. For more information, see Create a service hooks subscription.
Q: Can I remove an app's access to my organization after I've authorized it?
A: Yes. You can revoke authorizations from your profile.
Go to your profile page from https://visualstudio.microsoft.com/.
Make sure you start from the Visual Studio site (https://visualstudio.microsoft.com/) instead of your organization (
https://dev.azure.com/{orgName}
) because your profile accessed from your organization takes you to the wrong implementation of the authorizations management feature.Manage your authorizations.
Revoke any authorizations you no longer want to allow.
Q: Why can't we set up service hooks for HipChat anymore?
A: Atlassian officially dropped support for HipChat. See more on that announcement here.