Partager via


Create a service hook for Azure DevOps with Microsoft Teams

TFS 2017

See activity about your Azure DevOps Server (2017.2 and later) projects directly in your Microsoft Teams channel, for example:

  • Work item updates
  • Pull requests
  • Code commits
  • Builds
  • Release deployments and approvals

Configure a new connector for Azure DevOps Server

Configuring integration between Azure DevOps Server and Teams is a two-step process. First set up a connector in Teams, then set up one or more service hook subscriptions in your Azure DevOps Server project.

Note

Project administrator permissions are required to create service hook subscriptions. Events for YAML pipelines are not supported.

From Teams

  1. To bring events from Azure DevOps into Microsoft Teams, select '...', the ellipsis, or at the upper navigation of your team channel, select Connectors.

    Open the Teams actions menu

  2. Select Azure DevOps from the list.

    Connectors list

  3. Choose Add.

  4. Configure the connector.

  5. Copy the generated webhook URL. Provide this URL when you're setting up service hook subscriptions in your Azure DevOps project.

From Azure DevOps Server

  1. From your project page (https://mycompany/tfs/[collection]/[project]), go to Service Hooks in the settings:

    Azure DevOps Services, Service Hook Settings

  2. Click Create subscription and select the Teams service.

  3. Choose the type of activity you want to appear in your Teams channel. You can filter each of the triggers in specific ways.

    For example, the pull request created trigger can be filtered on the repository in which the pull request occurs, the target branch it applies to, and the team members that are required or invited to review the request.

  4. Paste the webhook URL from the Teams connector configuration step and select Finish.

Activity from your project begins appearing in your Teams channel.

Configure Azure DevOps tabs in Microsoft Teams

  1. To bring your Kanban board or dashboard into Microsoft Teams, select + Add new tab on the upper portion of your team channel. Find the Website icon and add the link to your Azure DevOps board or dashboard.

    Add a new tab to Teams channel

  2. Once you've authenticated, your Kanban board or dashboard appears.

Frequently asked questions (FAQs)

Q: How can I get multiple events from my Azure DevOps Server project to show up in my Teams channel?

A: Create a new subscription for each type of event you want. For example, if you want to see build failures and new work items in your Teams channel, create two additional subscriptions.

Q: Why don't I see my organization when trying to connect Microsoft Teams?

A: Only organizations in the same Azure Active Directory tenant as your Microsoft Teams account can be connected. Even if your email address is the same for Azure DevOps Services and Microsoft Teams, they may be backed by different tenants, so they can't be linked.

Create a new Team in the same Azure Active Directory (Azure AD) as Azure DevOps Services, or move your Azure DevOps Services to the same Azure AD as Teams, see Access via Azure AD FAQs, Why is my organization already connected to a directory?.