Microsoft Teams with Visual Studio Team Services (VSTS) and Team Foundation Server (TFS)
VSTS | TFS 2017.2
This topic applies to VSTS and to TFS 2017.2 and later versions.
See activity about your VSTS or Team Foundation Server (2017.2 and later) projects directly in your Microsoft Teams channel, for example:
- Work item updates
- Pull requests
- Code commits
- Release deployments and approvals
Also bring your VSTS Kanban board directly into Microsoft Teams as a tab.
While the functionality is the same across VSTS and Team Foundation Server, the configuration process is different. Check out the appropriate getting started section below for details.
You must be a member of Project Administrators or Project Collection Administrators to configure the connector.
Configuring a new connector for VSTS
To bring events from VSTS into Microsoft Teams, click the ellipsis or '...' at the top nav of your team channel, and then select Connectors.
Select VSTS from the list.
Select your VSTS account (you may be prompted to sign in first), the project, and your team.
Choose the type of activity you want to be notified about. Depending on the event, you may be given further fields to filter down the notifications so you can filter out notifications your team does not care about. For example, for work item events, you can filter by area path, work item type, and even particular field changes.
When you are happy with the configuration, save it.
Activity from your VSTS project will start appearing in your Teams channel.
Changing an existing connector
To make a change to an existing connector:
- Navigate to the "Configured" tab on the Connector dialog, find the connector, and click Manage.
Configuring a new connector for Team Foundation Server (TFS)
Configuring integration between Team Foundation Server and Teams is a two step process. First setup a connector in Teams, then setup one or more service hook subscriptions in your Team Foundation Server project.
Project administrator permissions are required to create service hook subscriptions.
To bring events from TFS into Microsoft Teams, click the ellipsis or '...' at the top nav of your team channel, and select Connectors.
Select Team Foundation Server from the list.
Choose a name for the Connector, for example "My project notifications", and click Create. Note: this name is only used for managing the Connector.
Copy the generated web hook URL. You will provide this URL when setting up service hook subscriptions in your TFS project.
From Team Foundation Server
From your TFS team project page (
https://mycompany/tfs/[collection]/[project]), navigate to Service Hooks in the settings:
Click Create subscription and select the "Teams" service.
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.
Paste the web hook URL from the Teams connector configuration step and click Finish.
Activity from your TFS project will start appearing in your Teams channel.
Kanban board & Dashboards in Teams (VSTS only)
Bring in your teams kanban board or favorite dashboard directly into Microsoft Teams.
The Kanban board and Dashboard integration has the following limitations:
- Only works for VSTS (Team Foundation Server is not supported)
- Only Kanban boards and Dashboards within VSTS accounts in the same organization (Azure Active Directory tenant) as your Microsoft Teams account can be configured.
Configuring VSTS Tabs in Microsoft Teams
To bring your Kanban board or Dashboard into Microsoft Teams, click the '+' ('add new tab') button on the top nav of your team channel. Find the Visual Studio icon and follow the steps to connect to your VSTS account.
Once you have authenticated and selected your VSTS account, you will be displayed a screen to select a Kanban board or Dashboard.
Q & A
Q: How can I get multiple events from my TFS 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: I don't see my VSTS account when trying to connect Microsoft Teams
A: Only VSTS accounts in the same organization (Azure Active Directory tenant) as your Microsoft Teams account can be connected. This means even if the sign-in email address is the same for VSTS and Microsoft Teams, they may be backed by different tenants and therefore cannot be linked.
To resolve this you can create a new Team in the same Azure Active Directory (AAD) as VSTS, or move your VSTS to the same AAD as Teams (see Q: Why is my VSTS account already connected to a directory? Can I change that directory?).