Microsoft Azure DevOps Spoke
My Knowledge Hub
·
Feb 18, 2023
·
article
**Introduction**
In most of the companies Azure DevOps is used as an backlog management system migrating from other tools such as JIRA. Automation is a key, so many team want to create bugs, stories automatically from ServiceNow into Azure DevOps. We are using Strategic Portfolio management as well which makes use of this spoke to sync work items and there progress with Projects into ServiceNow.
Today our focus will be on enabling the spoke, pre-requisite needed to setup the spoke, how to setup the spoke and some common use cases on how we can use this spoke. Focus will be to help developers to use this spoke easily and decide on boarding teams, when I say that it means there are multiple ways you can setup the credentials in ServiceNow. But for that reason you need a defined strategy on how you want to use the spoke within your organization.
**Enabling the Spoke**
1. You need IntegrationHub Professional subscription
2. Install the plugin from All available plugins : Azure DevOps Boards spoke v1.8.0 is the latest version.
3. This spoke was built for Azure DevOps Boards REST API version 4.1 and TFS 2018 Update 3, but may be compatible with later versions.
**Credential Setup**
Here I will share my own knowledge and best practice to setup this spoke. The way Azure DevOps works is bit different meaning they have an hierarchy of elements aka organizations, projects, work items etc. So it’s very important that you have access to those elements when you want to integrate with ServiceNow. Below images shows hierarchy of one organization.

Here you can see that Ashutosh is an organization to which you need and access so you perform operations on items linked to that organization. That been said, we need Personal access token for an user who has access to organization. To set this connection you need to follow documentation link :
But for me the drawback here is the user only has access to that organization, but within any organization i.e. company you have multiple business units who has their own organizations which makes it very difficult to manage credentials for this spoke. This spoke does support multiple active credentials but again manageability is a concern. So to overcome that my recommendation is to use master credentials and have control mechanism on that credentials by linking it to active directory. Use that master accounts PAT to integrate with this spoke.
This approach will allow you to offer this spoke as an general offering to all the teams within the organizations. Of course you need some onboarding details for connection but that is something you can decide when you start integration.
**Setup Connection Alias**
1. Go to connection dashboard via IntegrationHUB
2. Configure the Connection by going to connection alias and create connection as below.
3. Connection Attribute is one of the important section where the supported Version is mentioned for the REST API as mentioned in enabling section at the top.


ORGANISATION-NAME should be replaced by organization id in Azure DevOps and PROJECT-NAME also replaced by project id from Azure DevOps. And credentials as discussed in above section.
**Use Case**
Once the connections is setup, we are ready to use spoke in any flow within ServiceNow. Lets imagine we want to create an bug into Azure DevOps from ServiceNow for an incident. For that we need to fetch work item types and then create an incident into Azure DevOps. We can hardcode the type as well but few teams might want the incident as Bug and few as stories so let them decide it on the fly and flow they want. This is very important for Citizen Developers as they want flexibility in using the spokes.
NOTE : I will create detail working live stream or video with Dhruv on this spoke.
1. Fetch work items : To use this we need to pass the alias and project name.

2\. Create work item : If you see that we need work item type to create work item, so its mandatory for us to first decide that and fetch it from Azure and Pass it to below action.

Final flow looks as below :

As mentioned this was just an basic example of using the spoke. Different actions need different inputs and we need to make sure we fetch them accordingly and make this more dynamic.
Subscribe for the detailed video on this integration.
Thank you,
Ashutosh Munot
ServiceNow Architect
ServiceNow MVP
https://ashutoshmunot.wordpress.com/2023/02/18/microsoft-azure-devops-spoke/
Ashutosh Munot