Sie sind auf Seite 1von 113

Table of Contents

Integrate with other services


Overview
Quickstarts
Integrate with Slack
Integrate with Jenkins
Integrate with Trello
How-to Guides
Integrate with AppVeyor
Integrate with Azure Service Bus
Integrate with Azure Storage
Integrate with Bamboo
Integrate with Campfire
Integrate with Flowdock
Integrate with HipChat
Integrate with Hubot
Integrate with MyGet
Integrate with Microsoft Teams
Integrate with UserVoice
Integrate with WebHooks
Integrate with Zapier
Integrate with Zendesk
Authorize other services
Troubleshoot
Troubleshoot and FAQs
Resources
Visual Studio Marketplace
Billing information
Integrate VSTS with other applications
9/13/2017 • 1 min to read • Edit Online

Service hooks enable you to perform tasks on other services when events happen in your Visual Studio Team
Services (VSTS) projects. For example, create a card in Trello when a work item is created or send a push
notification to your team's mobile devices when a build fails. Service hooks can also be used in custom apps and
services as a more efficient way to drive activities when events happen in your projects.

5-minute Quickstarts
Integrate with Slack
Integrate with Jenkins
Integrate with Trello

How-to Guides
Integrate with AppVeyor
Integrate with Azure Service Bus
Integrate with Azure Storage
Integrate with Bamboo
Integrate with Campfire
Integrate with Flowdock
Integrate with HipChat
Integrate with Hubot
Integrate with MyGet
Integrate with Microsoft Teams
Integrate with UserVoice
Integrate with WebHooks
Integrate with Zapier
Integrate with Zendesk
Authorize applications with VSTS

Troubleshooting
Troubleshoot service hooks and FAQs

Resources
Visual Studio Marketplace
Billing information
Integrate with service hooks
1/8/2018 • 2 min to read • Edit Online

Service hooks enable you to perform tasks on other services when events happen in your VSTS projects. For
example, create a card in Trello when a work item is created or send a push notification to your team's mobile
devices when a build fails. Service hooks can also be used in custom apps and services as a more efficient way to
drive activities when events happen in your projects.

Available services
These services are available as the target of service hooks. To learn about others apps and services that
integrate with VSTS, visit the Visual Studio Marketplace

BUILD AND RELEASE COLLABORATE CUSTOMER SUPPORT PLAN AND TRACK INTEGRATE

AppVeyor Campfire UserVoice Trello Azure Service Bus

Bamboo Flowdock Zendesk Azure Storage

Jenkins HipChat Web Hooks

MyGet Hubot Zapier

Slack

Create a subscription
When you integrate one of these services with VSTS, you have to create a new subscription, something like this. In
many cases, you have to do some work in the other service, too. For specific details, look at the information on the
service that you're interested in.
1. Open the admin page for a team project in web access.

2. Create a subscription by running the wizard.


3. Select the service you want to integrate with.

4. Select the event to trigger on and any filters (if applicable).


5. Select an action to perform on the target service.

NOTE
The list of available actions may be limited based on the event type you selected.
6. To confirm the settings are correct, test the subscription and then finish the wizard.

Q&A
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, use tfssecurity.exe from the command line. For example:

tfssecurity /a+ /collection:https://fabrikam.visualstudio.com/DefaultCollection ServiceHooks


PublisherSecurity/abcdef00-abcd-0000-0000-abcdef000000 ViewSubscriptions n:fabrikamfiber4@hotmail.com ALLOW

and

tfssecurity /a+ /collection:https://fabrikam.visualstudio.com/DefaultCollection ServiceHooks


PublisherSecurity/abcdef00-abcd-0000-0000-abcdef000000 EditSubscriptions n:fabrikamfiber4@hotmail.com ALLOW

The GUID is the ID of the team project. You can get it using the Projects 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 team project project and the notification
history for those subscriptions. That user will be able to create any type of service hook subscription in that project.
If the user sets up a subscription for a resource that he does not otherwise have permission to access, the
subscription will not get triggered.
For example: if I don't have access to work items in area path XYZ, and I set up a subscription to the work item
update events, I won't get notifications for updates to work items in area path XYZ. However, if another user who
does have access to the work items in area path XYZ is receiving those "work item update" events, then I could see
the notification history of that other user's events, which includes work item data that I don't otherwise have access
to.
Q: Can I create service hook subscriptions for a project programmatically?
A: Yes. Go here for more details.
Q: Can I remove an app's access to my account after I've authorized it?
A: Yes. You can revoke authorizations from your profile.
1. Go to your profile page from http://visualstudio.com.
Make sure you start from the Visual Studio site (http://visualstudio.com) instead of your account (
https://{account}.visualstudio.com ) because, right now, your profile accessed from your account will take
you to the wrong implementation of the authorizations management feature.
2. Manage your authorizations.

3. Revoke any authorizations you no longer want to allow.


Slack with VSTS
12/7/2017 • 1 min to read • Edit Online

Post messages to Slack in response to events in your VSTS account, like completed builds, code changes, and new
and updated work items.

Create the Slack integration


1. From any page on your team's Slack ( https://[team].slack.com/... ), click your account name in the left
window pane to open up the menu, and find Apps and integrations:

2. Search for and click the VSTS integration:

3. On the VSTS integration page, click Install.


4. Choose a channel to have notifications posted to from the dropdown and click Add Visual Studio Integration.
5. Scroll down the page and copy the web hook URL to use when you create the service hook subscription in your
VSTS account.
Create a service hook subscription in your VSTS account
1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Choose the types of events you want to appear in your Slack 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.

3. Paste the web hook URL from the Slack integration that you created and click Finish.

4. Now, when the event you configured happens in your project, a notification will apear in your team's Slack
channel.
Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Why don't I have the pull request events as an option when I configure my trigger?
A: Pull requests are only available with team projects that use Git. If your team project uses TFVC, pull event
triggers aren't available, and your code event is called "Code checked in" instead of "Code pushed".
Q: How can I get multiple events to show up in my Slack 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 Slack channel, create two additional subscriptions.
Jenkins with VSTS
12/7/2017 • 1 min to read • Edit Online

If you use Jenkins to build your apps, you can store your code in VSTS and continue to use Jenkins for your
continuous integration builds. You can trigger a Jenkins build when you push code to your team project's Git
repository or when you check code in to Team Foundation version control.

Configure Jenkins
1. If you haven't already, set up a Jenkins server.
2. If you're setting up Jenkins on-premises, enable HTTPS.

Set up a Jenkins build


1. In Jenkins, create a new item.

2. Create the type of build that's appropriate for your project.

3. Set the URL for your Git repository in VSTS. The URL is in the form
https://{VSTS account}.visualstudio.com/DefaultCollection/_git/{team project} .
Trigger Jenkins from VSTS
1. If you haven't already, enable alternate credentials in your VSTS profile. Be sure to set a secondary user
name because you won't be able to use your email account to connect VSTS to Jenkins.

2. Go to your VSTS project service hooks page:


https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


3. Add Jenkins.

4. Pick the event from VSTS that you want to trigger a Jenkins build.
5. Configure the action to take in Jenkins.
Now, when that event occurs in VSTS, your Jenkins build will be triggered.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I build part of my app in VSTS and part in Jenkins?
A: Yes. You can trigger a Jenkins build when your VSTS build is completed so that you use both systems to build
your app.
Q: Can I programmatically create subscriptions?
A: Yes, use REST APIs.
Trello with VSTS
12/7/2017 • 3 min to read • Edit Online

Create cards and lists in Trello in response to events from VSTS. For example, when code is pushed, or a build
occurs.

Get a Trello authorization token


1. If you don't have a Trello account, get one here.
2. Go to the Authorize VSTS for Trello page, and sign in with your Trello credentials.
3. Allow VSTS to use your Trello account.

4. Copy the authorization token.

Create a Trello card or list from a VSTS event


1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Pick the Trello service.
3. Configure the triggering Visual Studio event. In this case, we're going to have the subscription respond
when a work item is created.

4. Set up the action that Trello will take in response to the trigger - either create a card or a list.
You can use placeholders to insert content from the event into the name and description of the cards or lists
that the subscription creates. For example, when we run the test notification, the card that gets created is
named "Bug #5: Some great new idea!" because the test work item is a bug (ID=5) with the title "Some great
new idea!".
5. Test the service hook subscription and finish the wizard.

Now its setup. Go to Trello and see the cards appear.


Placeholders
You can insert placeholders in the name of a list or the name or description of a card to be created by your
subscription. When a list or card is created, the placeholders will be replaced by values from the event that was
raised. The example we used for the card name in this page uses:

{{workitem.workItemType}} #{{workitem.id}}: {{workitem.title}}

So when a bug is created with the ID 5 and title "Some great new idea!", the card name is "Bug #5: Some great new
idea!".
The basic form of the placeholder is {{resource.field}} where resource is the name of the resource raising the
event (workitem, build, etc) and field is a field within the resource section of the event, like id. So, if the subscription
were for a completed build, it might be something like

Build {{build.id}} completed at {{build.finishTime}}

To understand what fields are available to use, look at the events reference.
Work item fields
Work item fields appear in the event in the fields array, like this:

" fields": {
" System.AreaPath": "Fabrikam-Fiber-Git",
" System.TeamProject": "Fabrikam-Fiber-Git",
" System.IterationPath": "Fabrikam-Fiber-Git",
" System.WorkItemType": "Product Backlog Item",
" System.State": "New",
" System.Reason": "New backlog item",
" System.CreatedDate": "2014-11-05T21:11:28.85Z",
" System.CreatedBy": "Normal Paulk",
" System.ChangedDate": "2014-11-05T21:11:29.23Z",
" System.ChangedBy": "Normal Paulk",
" System.Title": "Test PBI",
" Microsoft.VSTS.Common.BacklogPriority": 999999999,
" WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "New"
},

Working directly from the event definition, we would have created our card name like this:

{{workitem.fields["System.workItemType"]}} #{{workitem.fields["System.id"]}:
{{workitem.fields["System.title"]}}

As a shortcut, you can reference any fields in the System or Microsoft.VSTS.Common namespaces as if they were
fields of the resource. So {{workitem.fields["System.workItemType"]}} becomes {{workitem.workItemType}} .
Placeholder expressions
These placeholders use a (handlebars templates)[http://handlebarsjs.com/] implementation that is largely
compatible with Mustache. Some useful expressions include

TYPE OF EXPRESSION EXAMPLES

basic expressions {{workitem.name}}

array expressions {{pullRequest.reviewers.[0].displayName}}

Mustache sections {{#workitem.assignedTo}} This WI is assigned


{{/workitem.assignedTo}}

Mustache Inverted Sections {{^workitem.assignedTo}} This WI is not assigned


{{/workitem.assignedTo}}

Handlebars block helpers with


if/else
unless
each

Handlerbars paths ...


this
For example, {{../comment/id}} or {{this/title}}

Template comments {{!-- this is a handlebar comment --}}

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I programmatically create subscriptions?
A: Yes, see details here.
Q: Can I get more information about Trello?
A: Yes, trello.com.
AppVeyor with VSTS
9/13/2017 • 1 min to read • Edit Online

Set up continuous integration builds in AppVeyor for the code in your VSTS Git repositories.

Integrate AppVeyor with VSTS


1. If you don't have an AppVeyor account, sign up with your VSTS account.

2. Create a new project.

3. Add a Git repository from your VSTS account.


Now an AppVeyor CI build will start whenever you push code to your repository in VSTS.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Do I need to sign into AppVeyor using my VSTS ID in order to setup this integration?
A: No. If you use an account that's not already assocaited with your Visual Studio ID, you'll authorize access to your
VSTS account when you add Git repositories from VSTS.
Q: Does AppVeyor change anything in my VSTS account?
A: Yes. It adds a service hook subscription to your team project.
Q: What happens if I remove the AppVeryor project?
A: The AppVeyor service hook subscription is removed from VSTS.
Q: Can I get notification of AppVeyor builds in my VSTS team room?
A: Yes, you can set that up in the AppVeyor Notifications page.

Q: If I reconfigure AppVeyor from VSTS, where do I get the webhook ID used by AppVeyor?
A: From the projects settings:
Q: Where can I get more information about AppVeyor?
A: AppVeyor.com.
Microsoft Azure service bus with VSTS
12/7/2017 • 3 min to read • Edit Online

The Microsoft Azure service bus provides messaging between services and applications. You can choose the type of
service bus you want to send VSTS messages to:
Queue: The Service Bus queue is a simple process. A sender sends a message to a queue, and a receiver
picks up that message at a later time. A queue is limited to a single receiver.
Topics: Topics are similar to queues, but they let each receiving application create its own subscription by
defining a filter. A subscriber will see only the messages that match that filter.
Notification hub: Use a notification hub to implement push notifications. Notification hubs work for both
consumer and enterprise applications for mobile platforms including Android, iOS, Windows Phone 8, and
Windows Store.

Create a Microsoft Azure service bus namespace


1. If you don't have a Microsoft Azure account, get one here.
2. In the Microsoft Azure portal, in the navigation pane select SERVICE BUS and then create a new namespace.
<img alt="Select or create a service bus" src="./_img/azure-service-bus/create-service-bus.jpg")>
3. Enter a name for the namespace and choose a region.

4. View the connection information for the namespace.


5. Copy the SAS connection string. You will need to provide this value when you create a Service Hook
subscription.

Send messages to the service bus queue


1. In the Azure portal, verify the queue you want to use, or create one.

2. Create or modify your app's code to receive VSTS messages using a Azure Service Bus queue. For details, go
here.
3. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project
Click Create Subscription.
4. Pick and configure the VSTS event.

5. Configure what to do when the action occurs. In this case, to send Visual Studio messages to a service bus
queue. For the SAS connection string, use the value that you copied earlier from the namespace connection
information page.
6. Test the service hook subscription and finish the wizard.
Now the messages are set up. You can verify this in your application or service.

Send messages to the service bus topic


1. In the Azure portal, verify the queue you want to use, or create one.

2. Create or modify your app's code to recieve VSTS messages using a Azure Service Bus topic. For details, go
here.
3. Open the admin page for the team project in VSTS.
4. On the Service Hooks tab, run the subscription wizard.
For details about the subscription wizard, go here.
5. Pick and configure the VSTS event.

6. Configure what to do when the event occurs. In this case, to send Visual Studio messages to a service bus
topic. For the SAS connection string, use the value that you copied earlier from the namespace connection
information page.
7. Test the service hook subscription and finish the wizard.
Now the messages are set up. You can verify this in your application or service.
You can also observe activity in the Windows Azure dashboard.

Send messages to the notification hub


Push VSTS messages to your application using a notification hub. For more information about notification hubs go
here.
1. In the Azure portal, verify the notification hub you want to use, or create one.

2. Create or modify an app to receive messages from VSTS through the notification hub. The steps and code
required to set up your app depend on the target platform (Android, iOS, Windows Phone 8, and Windows
Store). For details, go here.
3. Open the admin page for the team project in VSTS.
4. On the Service Hooks tab, run the subscription wizard.
For details about the subscription wizard, go here.

5. Pick and configure the VSTS event.


6. Configure what to do when the event occurs. In this case, to send Visual Studio messages to a service bus
notification hub. For the SAS connection string, use the value that you copied earlier from the namespace
connection information page. You can use tags to filter the messages to specific registered apps or users.
For more information regarding tags go here.

7. Test the service hook subscription and finish the wizard.


Now the messages are set up. You can verify this in your application or service.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: When using VSTS service hooks connected to a Azure notification hub, how do I pass parameters in a push notification template?
A: Use the following taking care to concatenate the variable and value in the param node:

"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +


"<wp:notification wpnotification\"="" xmlns:wp="\">" +
"<wp:toast>" +
"<wp:param>" + "{'?VariableName='" + "$(parameter)" + "}</wp:param>" +
"</wp:toast>" +
"</wp:notification>";

Q: Can I get more information about the differences between service bus queues and service bus topics?
A: Get more details here.
Q: Can I programmatically create subscriptions?
A: Yes. See details here.
Azure Storage Queue
12/7/2017 • 2 min to read • Edit Online

Insert a JSON string message in a storage queue in response to events from VSTS. For example, you can insert a
queue message when a work item is created or changed, or a build occurs.
The storage queue provides reliable, persistent messaging within and between services. Messages can be accessed
from anywhere in the world via authenticated calls using HTTP or HTTPS. A single queue message can be up to 64
KB in size, and a queue can contain millions of messages, up to the total capacity limit of a storage account.

Create a Microsoft Azure storage account


1. If you don't have a Microsoft Azure account, get one here.
2. In the Microsoft Azure portal, at the bottom of the navigation pane, click NEW.

3. Click DATA SERVICES, then STORAGE, and then click QUICK CREATE.
In URL, type a subdomain name to use in the URI for the storage account. The entry can contain from
3-24 lowercase letters and numbers. This value becomes the host name within the URI that is used to
address Blob, Queue, or Table resources for the subscription.
Choose a Region/Affinity Group in which to locate the storage. If you plan to use storage from your
Azure application, select the same region where you will deploy your application.
Optionally, you can enable geo-replication.
Click CREATE STORAGE ACCOUNT.

4. Select the storage account and click MANAGE ACCESS KEYS.


5. Copy the storage account name and primary acccess key. You need to provide these values when you create
a Service Hook subscription.

You do not have to add a storage queue. This can be done when you create a service hook subscription.
Create a service hook subscription
1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Pick the VSTS event to use as a trigger to insert a message in a storage queue.

3. Enter the storage account name and the queue where you want to insert the event into. For the account key,
use the primary access key value that you copied when you managed the access keys.
4. Test the service hook subscription and finish the wizard.
Now the event is set up. Your messages are put into the Azure storage queue and are available for reading.

Reading messages from the queue (.NET Framework)


An event matching a Service Hook subscription will be added to the selected storage queue as a JSON string. You
can then use APIs provided by the Microsoft Azure SDK for .NET Framework (and other languages) to access the
message:
1. How to: Peek at the next message
2. How to: Dequeue the next message
Example:

// Retrieve storage account from connection string


CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));

// Create the queue client


CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();

// Retrieve a reference to a queue


CloudQueue queue = queueClient.GetQueueReference("myqueue");

// Get the next message


CloudQueueMessage retrievedMessage = queue.GetMessage();

//Process the message in less than 30 seconds, and then delete the message
queue.DeleteMessage(retrievedMessage);

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.
Q&A
Q: Can I get more information about Microsoft Azure storage?
A: Yes, go here.
Q: Can I programmatically create subscriptions?
A: Yes, see details [here](../../integrate/get-started/service-hooks/create-subscription.
Bamboo with VSTS
12/7/2017 • 1 min to read • Edit Online

If you use Bamboo to build your apps, you can store your code in VSTS and continue to use Bamboo for your
continuous integration builds. You can trigger a Bamboo build when you push code to your team project's Git
repository, when you check code in to Team Foundation version control, or when a VSTS build finishes.

Configure Bamboo
1. If you haven't already, set up a Bamboo server.
2. If you use Bamboo on-premises, enable HTTPS on your Bamboo server.
3. If your team project uses Team Foundation version control and not Git, install the TFS respository add-on for
Bamboo.

Enable VSTS basic authentication


1. If you haven't already, enable alternate credentials in your VSTS profile. Be sure to set a secondary user
name because you won't be able to use your email address to connect VSTS to Bamboo.

Set up a Bamboo build plan


1. In Bamboo, create a new plan by choosing Create > Create a new plan from the menu bar.
2. Under Link repository to new build plan, choose Other > Git and set the URL for your Git repository in
VSTS. The URL is in the form
https://{VSTS account}.visualstudio.com/DefaultCollection/_git/{team project name} .
3. Next to Authentication Type, choose Username/password and enter the alternate credentials of a VSTS
account with read access to the repository.

Trigger Bamboo from VSTS


1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Add Bamboo.
3. Pick the event from VSTS that you want to trigger a build in Bamboo.
4. Configure the action you want Bamboo to take.
Now, when that event occurs in VSTS, your Bamboo build will be triggered.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I build part of my app in VSTS and part in Bamboo?
A: Yes. You can trigger a Bamboo build when your VSTS build is completed so that you use both systems to build
your app.
Q: Can I programmatically create subscriptions?
A: Yes, use REST APIs.
Notifications and Campfire
12/7/2017 • 1 min to read • Edit Online

Post messages to a room in Campfire in response to events from VSTS. For example, you can post a message when
a work item is created or changed, or a build occurs.

Get a Campfire authorization token


1. If you don't have a Campfire account, get one here, and create a room.
2. Copy the token from your Campfire profile page.

Post messages to a room


1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Configure the VSTS event that will post a message in a Campfire room.
3. Configure the action with your Campfire account name, authentication token and room.
4. Test the service hook subscription and finish the wizard.

Now the messages are set up. Go to Campfire and see the messages.
Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I programmatically create subscriptions?
A: Yes, see details here.
Q: Where can I get more information about Campfire?
A: At campfirenow.com.
Notifications and Flowdock
12/7/2017 • 1 min to read • Edit Online

VSTS can post messages to your flow in Flowdock so everyone will know when code has been pushed or checked
in, a build has finished, or a work item has been created or updated.

Set up a flow
1. If you don't have a Flowdock account, get one here.
2. In Flowdock, add a flow.

3. Create the flow.

4. Configure the flow.


5. Go to the flow's administration page.

6. Get the API token.


Use a service hook to push messages
1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Choose Flowdock
3. Configure the VSTS event that will push a message to Flowdock.
4. Tell Flowdock what action to take.
5. Test the service hook subscription and finish the wizard.

Now messages will be posted to your flow in Flowdock.


Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I programmatically create subscriptions?
A: Yes, see details here.
Q: Where can I get more information about Flowdock?
A: At flowdock.com.
HipChat with VSTS
12/7/2017 • 1 min to read • Edit Online

Post messages to a room in HipChat in response to events from VSTS. For example, when code is pushed, or a
build occurs.
Get a HipChat authorization token
1. If you don't have a HipChat account, get one here.
2. In HipChat, get a room token.

3. Copy the token.


Post a message to a room
1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Choose HipChat.
3. Configure the VSTS event that you want to post a message in HipChat.
4. Tell HipChat what to do when the event occurs.
5. Test the service hook subscription and finish the wizard.

Now the messages are setup. Go to HipChat and see the messages appear.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I programmatically create subscriptions?
A: Yes, see details here.
Q: Where can I get more information about HipChat?
A: At hipchat.com.
Hubot with VSTS
12/7/2017 • 2 min to read • Edit Online

Using Hubot, you can type a command in your VSTS team room to create a work item, queue a build, recall what
you last worked on, and more. For example, create a bug by typing "hubot vso create bug Error in latest service
code" or assign a work item with the command "hubot vso assign 123 to Sally". And you can add scripts to extend
what your Hubot service can do.

Set up Hubot
Set up a Hubot instance and configure the VSTS adapter to accept messages from a team room in VSTS.
1. If you don't already have your own Hubot instance, set one up. A good way to do that is to deploy Hubot to
an Azure web site.
a. Create an Azure web site enabled for local Git deployment.
b. Create your own Hubot instance locally by cloning Hubot.
2. Add the VSTS adapter for Hubot.
3. Add the VSTS scripts for Hubot.
4. Push your configured Hubot instance to your web site.
5. Set the necessary configuration parameters on your site, including HUBOT_ADAPTER=vsonline, and start it.
6. Create a service hook subscription in your VSTS project that sends messages from a team room to your
Hubot instance.
Here are more detailed instructions for deploying a Hubot instance to an Azure web site.

Subscribe Hubot to team room messages in VSTS


Now that you've set up Hubot, create a service hook subscription that will forward messages in a VSTS team room
to your Hubot instance.
1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Select the Hubot service.

3. Configure an event to trigger when there are messages posted in your team room.
4. Select the Post a message action from the drop-down and supply the full URL and user name and
password of your Hubot instance.

5. Click Finish to save the subscription.


Now when you post commands starting with "hubot" to the selected room, Hubot will receive the command and
respond back to that room.

Commands
Here are the available VSTS commands available to users:
vso assign <work item list> to <user name> : Assigns one more or more work item(s) to a user (comma
separated ids)
vso build <build definition number> : Triggers a build
vso builds : Shows a list of build definitions
vso commits [last <number> days] : Shows a list of commits you have made in the last day (or specified number
of days)
vso create pbi|bug|feature|impediment|task <title> with description <description> : Creates a work item, and
optionally sets a description (repro step for some work item types)
vso forget credentials : Removes the access token issued to Hubot when you accepted the authorization
request
vso help <search text> : Get help from VS related forums about the <search text>
vso me : Shows info about your VSTS profile
vso projects : Shows a list of projects
vso room default <key> = <value> : Sets a room default project, etc.
vso room defaults : Shows room defaults (e.g. project, etc)
vso status : Shows status for the VSTS service
vso today : Shows work items you have touched and code commits you have made today

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.
MyGet with VSTS
9/13/2017 • 1 min to read • Edit Online

Use a MyGet feed for the following integration scenarios with VSTS:
When code is pushed to a Git repository in VSTS, MyGet pulls the code, builds it, and adds any resulting NuGet
packages to a feed.
When a NuGet package is built in VSTS, MyGet downloads the package and adds it to a feed.

Create and configure a MyGet feed


1. If you don't have a MyGet account, get one here.
2. In MyGet, add a feed.

3. Configure the feed.

Build and deploy a package when code is pushed


1. Add VSTS to your feed as a build source.
2. Use your VSTS account.

3. Authorize MyGet to access you VSTS account.


4. Configure the build source.

Now the feed is set up. When code is pushed, view the status of the triggered MyGet builds.
Deploy a package built on VSTS
1. Add the VSTS build definition as a package source for your feed.

2. Use your VSTS account.


3. Authorize MyGet to access your VSTS account.

4. Choose a build definition that includes a NuGet package in the build drop.
You've defined the package source.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Where can I get more information about MyGet?
A: At myget.org.
Microsoft Teams with Visual Studio Team Services
(VSTS) and Team Foundation Server (TFS)
1/3/2018 • 4 min to read • Edit Online

VSTS | TFS 2017.2

NOTE
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
Builds
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.

Configuring a new connector for VSTS


1. To bring events from VSTS into Microsoft Teams, click the ellipsis or '...' at the top nav of your team channel,
and then select Connectors.

2. Select VSTS from the list.


3. Select your VSTS account (you may be prompted to sign in first), the project, and your team.

4. 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.
5. 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:
1. 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.

NOTE
Project administrator permissions are required to create service hook subscriptions.

From Teams
1. To bring events from TFS into Microsoft Teams, click the ellipsis or '...' at the top nav of your team channel,
and select Connectors.
2. Select Team Foundation Server from the list.

3. Choose a name for the Connector, for example "My project notifications", and click Create. Note: this name is
only used for managing the Connector.
4. 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
1. From your TFS team project page ( https://mycompany/tfs/[collection]/[project] ), navigate to Service
Hooks in the 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 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 in Teams (VSTS only)

Developers and product managers can track and create new work items by bringing their VSTS Kanban boards
right into Microsoft Teams. All your favorite Kanban board features - live refresh, card styling, tag coloring,
extensions, and more - are available without leaving your team's channel.

NOTE
The Kanban board integration has the following limitations
1. Only works for VSTS (Team Foundation Server is not supported)
2. Only Kanban boards within VSTS accounts in the same organization (Azure Active Directory tenant) as your Microsoft
Teams account can be configured.

Configuring your VSTS Kanban board for Microsoft Teams


1. To bring your Kanban board 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.

1. Once you have authenticated and selected your VSTS account, select the project, team and level of the board
you want to add.
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?).
UserVoice
9/13/2017 • 1 min to read • Edit Online

Use User Voice to get feedback from your customers and push that feedback directly into your backlog in VSTS.
When your team updates the item in the backlog, the User Voice item is updated, too.
Link your VSTS account to your UserVoice account.
1. If you don't have a UserVoice account, get one here.
2. In UserVoice, go to the integrations page.

3. Set up a synced service.


4. Sync to VSTS.

5. Link your VSTS account to your UserVoice account.


6. Authorize UserVoice to access your VSTS account.

Add an item to your backlog from a UserVoice idea


You can create a work item in VSTS form an idea in UserVoice. In this case, we're creating a product backlog item.
You might want to create a bug in some cases. Or, if your team uses user stories instead of product backlog items,
you can create those.
1. Open an idea in the admin area of UserVoice and then create a work item in Visual Studio.
2. Create the backlog item in VSTS. The description you type here will be the description of the item in VSTS.

3. Submit the idea. A link to the item in VSTS shows up on the UserVoice idea.

4. Follow that link to open the backlog item in VSTS.


Update a your backlog
When you update your backlog in VSTS, the UserVoice idea is updated, too.
1. Approve the backlog item.

2. Add a comment in the history control.

3.In UserVoice, refresh the page and you'll see that the item was just updated and that the comment added in the
history control is displayed with the item in UserVoice. Your customers can see that you're doing this work.
<img alt="Updated work item in Uservoice idea" src="./_img/uservoice/updated-work-item.png" style="border: 1px
solid #CCCCCC" />

Add comments to items in VSTS from UserVoice


1. In UserVoice, add a note to the linked VSTS item.

2. In VSTS, refresh the work item to see the note in the discussion tab.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can I programmatically create subscriptions?
A: Yes, see details here.
Q: Where can I get more information about UserVoice?
A: At UserVoice for VSTS.
Web Hooks
12/7/2017 • 1 min to read • Edit Online

Web Hooks provides a way to send a JSON representation of an event to any service. All that is required is a public
endpoint (HTTP or HTTPS).
For more information about the JSON payloads posted by this consumer, see events.

Send JSON representation to a service


1. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


2. Select and configure the VSTS event:
3. Configure what to do when the event occurs:
See Q & A below for information on the Resource details to send, Messages to send, and Detailed
messages to send settings.

4. Test the service hook subscription and finish the wizard:

Now the Web hook is set up. Go to the target service to view the JSON representation:
Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: What are the Resource details to send, Messages to send, and Detailed messages to send settings for?
A: They control the size of the JSON payload that is sent.
The Resource details to send setting controls how much of the resource is sent. The default is All, but you can
also choose to send Minimal (only sends key fields like URL and ID), or None.
None and Minimal are useful in scenarios where the caller doesn't actually need much, if anything, about the
resource because it is relying on the message or detailed message. None and Minimal are also useful for security
reasons, for example, the caller needs to call back into VSTS and go through normal security/permission checks in
order to get more details about the resource.
Sample JSON:
{
"event.type": "git.push",
...
"messsages": {
"text": "...",
"html": "...",
"markdown": "..."
},
"detailedMesssages": {
"text": "...",
"html": "...",
"markdown": "..."
},
"resource": {
"id": "...",
"url": "https://...",
"name": "...",
"field1:": "..."
}
}

Q: Can I programmatically create subscriptions?


A: Yes, see details here.
Zapier with VSTS
9/13/2017 • 2 min to read • Edit Online

Use Zapier to connect VSTS to other apps for development, operations, customer connection, sales, marketing and
more. Once you have your Zapier account, just create a zap to send messages between VSTS and those other apps.

Create a note when code is pushed


Create a zap that responds to an event from Visual Studio and triggers an action in another app. In this case, we
create a note in OneNote when code is pushed to a Git repository in our VSTS account to show how that works.
1. If you don't already have one, sign up for a Zapier account.
2. Create a zap.

3. Pick the event in Visual Studio that you want to respond to, and then choose the app that you want to
trigger and the action you want that app to take.

4. Connect to your VSTS account.

5. Connect to the app that will respond to the event.


6. Authorize Zapier to access your account's resources.

7. You can filter the events coming from VSTS for this zap. For example, this zap will only act on code pushes in
the master branch of the default repository for this team project. Pushes in other team projects, other
repositories, or other branches of this repository will be ignored by this zap.
8. Configure the response to the event in the other app.

9. Verify that the zap works.


10. Name the zap and turn it on.

Now the zap is set up, you'll get new notes in OneNote each time code is pushed in VSTS.
Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Can VSTS take actions based on events from other apps, too.
A: Yes, you can create a zap to post a message to a team room, queue a build, or add a link to a work item in VSTS.
Just choose VSTS as the app that's taking the action instead of raising the event.

Q: Why can't I create a zap?


A: If you are not able to create a zap, make sure that:
Service hooks are enabled on the VSTS account you are trying to create the zap in.
You are a project administrator (or have the appropriate service hook management permissions) on the project.
Q: Why can't I connect to the VSTS service?
A: Verify that you are a project administrator for the VSTS project you are attempting to create zaps against.
Q: Can I programmatically create subscriptions?
A: Yes, see details here.
Q: Where can I get more information about Zapier?
A: At Zapier for VSTS.
Zendesk with VSTS
12/7/2017 • 3 min to read • Edit Online

If you use Zendesk to support your customers, you can create work items in VSTS directly from your Zendesk
tickets. Then you can configure VSTS to update the Zendesk ticket when the work item is updated.

Install the VSTS app for Zendesk


1. Download the .zip file that contains the VSTS for Zendesk app from GitHub.
2. If you don't have a Zendesk account, get one.
3. Go to your Zendesk administration page to mange your apps.

4. Upload the VSTS for Zendesk app .zip file


5. Install and configure the app

If you use a work item tag, work items you create from Zendesk will have that tag. Later, you can use it to
find items that were created from Zendesk.

Authenticating
Each user of the app must provide credentials so that the VSTS app can create and query work items as that user.
Creating a personal access token is recommended.
1. Navigate to the VSTS account you associated with your Zendesk account (from step 5 above)
2. Open the profile menu and select Security
3. Create a personal access token

Suggestions:
Give the token a recognizable name so you can find it later if you need to revoke it or check its expiration
date
Scope the token to the account associated with Zendesk
Limit to at least Work item (read and write)
4. Copy the token and paste it into the Password field of the VSTS app in Zendesk

If you are running version 0.5.0 or higher of the app, you do not need to specify a Username. Otherwise,
supply any value into the Username field (for example "me").

Create a work item from Zendesk


1. Go to a ticket in Zendesk and log in to the VSTS for Zendesk app.

2. Add a work item to VSTS based on this ticket.

3. Create the work item.


4. Open the work item in VSTS directly from Zendesk.

In VSTS, the work item is tagged with the tag you set up , and it's linked back to the ticket in Zendesk.
Configure VSTS to update Zendesk tickets
Close the loop by configuring VSTS to update the Zendesk tickets whenever there's a change in the work items that
were created from Zendesk.
1. Go to the your Zendesk API administration page.

2. Enable token access and copy your token.


3. Go to your VSTS project service hooks page:
https://{account_name}.visualstudio.com/{project_name}/_apps/hub/ms.vss-servicehooks-
web.manageServiceHooks-project

Click Create Subscription.


4. Start configuring Zendesk.
5. Use the Work item is commented on event. You can filter for comments, too. For example, you can only
act on comments that contain the string "Zendesk:" and only those comments will be reflected back to
Zendesk.
6. Configure the action that Zendesk will take in response to that event. This is where you provide the Zendesk
access token.
Now when you update the work item, a private comment will be added to the Zendesk ticket.

Pricing
VSTS doesn't charge for the framework for integrating with external services. Check out the specific service's site
for pricing related to their services.

Q&A
Q: Why do I keep getting prompted for a user name and password?
A: If you supplied a Personal Access Token (recommended) in the login panel of the app, make sure the token is
scoped either to "all accessible accounts" or to the specific VSTS account configured in the app's settings. To open
the app settings from Zendesk go to Settings > Apps > Manage.
Also make sure the token has not expired and that it has the Work items (read and write) scope.
For more details, see the Authenticating section above or the Authenticate access with personal access tokens topic.
Q: Can I programmatically create subscriptions?
A: Yes, use the REST APIs.
Authorize other services to access your VSTS account
9/13/2017 • 1 min to read • Edit Online

When you use a service that's integrated with VSTS, we use the industry-standard OAuth 2.0 authorization
framework to provide safe, secure access to your resources by those other services. With OAuth, you grant a
service the authorization to access your VSTS resources such as work items, source code, build results.
Authorizations are bound to your credentials, so the service can use the authorization to access resources in
any VSTS account that you have access to.
Use your Microsoft account (like me@live.com ) or your work account (your account in Azure AD - like
me@my-workplace.com ) to authorize the service.

The service that you authorize never has access to your VSTS credentials.
Revoke any authorizations that you've granted to other services.

Authorize a service
A typical authorization flow might go like this:
1. You're using a service that uses VSTS resources, so the service requests authorization from VSTS.
2. If you're not already signed in, VSTS will prompt you for your credentials.

3. After you've signed in, you get the VSTS authorization approval page.
At this point in time, services can only request full access to all of the resources that are available to you
through the REST APIs, so don't be surprised that the authorization request is not more specific.
4. You review the request and approve the authorization.
5. The authorized service uses that authorization to access resources in your Visual Studio account.
To ensure an authorization request is legitimate:
Look for the VSTS branding across the top of the authorization approval page.
Ensure the authorization approval page URL begins with https://app.vssps.visualstudio.com .
Pay attention to any HTTPS-related security warnings in your browser.
Remember that other services do not ask for your credentials directly. They let you provide them to VSTS
through the VSTS authorization approval page.

Manage authorizations
To see the services that you've authorized to access your account, go to
https://app.vssps.visualstudio.com/Profile/View and follow the Manage applications link.
You can revoke any authorizations here and the service will no longer be able to access your account on your
behalf.
Troubleshoot a service hooks issue
9/13/2017 • 1 min to read • Edit Online

View activity and debug problems


The Service Hooks tab in the web access admin shows your the recent activity (last 14 days) for each subscription,
and whether a subscription is enabled, disabled, or restricted.
Detailed history about a subscription can be accessed, as well as detailed request/response data (useful for
debugging a problematic service or subscription).
1. To view the activity and status of your subscriptions, go to the Service Hooks tab.

2. To view detailed activity for a subscription, including full request, response, and event payload data, select a
subscription in the table and click History.
FAQs
Q: What does the status Enabled (restricted) mean?
A: A subscription becomes restricted if too many failures occur.
Q: What should I try if a service hook is not working?
A: Check these:
Confirm the subscription is enabled.
Confirm the subscription settings are correct (both event filters and actions).
Look at the History, especially if there are failures.
Q: Can I grant a regular project user the ability to view and manage service hook subscriptions for a project?
A: Use tfssecurity.exe from the command line, for example:

tfssecurity /a+ /collection: https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection ServiceHooks


PublisherSecurity/abcdef00-abcd-0000-0000-abcdef000000 EditSubscriptions n:fabrikamfiber4@hotmail.com ALLOW
```

**Note:** The GUID represents the team project ID which can be retrieved using the [Projects]
(https://visualstudio.com/integrate/api/tfs/projects.md) REST API.

#### Q: Can I programmatically create subsciptions?

A: Yes, use [REST APIs](./create-subscription.md).

<!-- ENDSECTION -->


Billing for VSTS
1/30/2018 • 1 min to read • Edit Online

All VSTS charges appear on your monthly Azure bill. Azure supports payment by credit card as well as invoiced
billing through the Enterprise Agreement (EA), Cloud Solution Providers (CSP), and more.
VSTS pricing
VSTS billing overview

Billing for TFS


TFS 2018 | TFS 2017 | TFS 2015
You can also make some purchases for TFS on your monthly Azure bill.
TFS pricing
How to buy TFS CALs or access to the TFS Test hub

5-Minute Quickstarts
Set up billing for VSTS
Free trials for paid VSTS features and extensions
How to pay for VSTS users
How to buy VSTS CI/CD

Other Resources
How to buy Visual Studio cloud subscriptions
How to buy Xamarin University subscriptions

Das könnte Ihnen auch gefallen