Contents

Azure DevOps Dashboard

Introduction

When you are managing Azure DevOps in a large enterprise organization, and you are still using only one Azure DevOps organization account, you are probably hitting some limits or have potential performance issues. Microsoft’s recommendation is to have around 300 projects in a single Azure DevOps organization account. I have seen Azure DevOps organizations with more than 600 projects that still work.

The solution is to set up a multi-organization structure. Move all the inactive projects to an archive or boneyard Azure DevOps organization account and add an extra Azure DevOps organization account per department.

Next, you need some insights and automation on which projects have no activity anymore. The Azure DevOps Dashboard gives you the basic insights and an API to automate tasks like emailing the owners of inactive projects.

Azure DevOps Dashboard

This dashboard solution generates a simple overview of all the Azure DevOps projects in your organization and calculates the last known activity in days on commits, work items, and the project itself. You can connect this dashboard (using the included endpoint) to Microsoft Power Automate or Excel to automate tasks on project level.

/azure-devops-dashboard/dashboard.png

Installation

The solution runs on as a single Azure Web App, it uses a background WebJob to collect all the data needed to present in the web dashboard.

Prerequisites

  1. An Azure account with an active subscription. Create an account for free.
  2. Install the Azure CLI on Windows to automate the following steps
  3. An Azure DevOps personal access token (PAT). See here how to get a personal access token.
  4. Download the Azure DevOps Dashboard Release.zip package.

Create an Azure Web App

In the next steps, you will create a resource group, an app service plan (the webserver), and the Web App (the solution itself). We also add two application settings to store the Azure DevOps personal access token.

  1. Login into your Azure subscription
1
az login
  1. (Optional) Select the subscription where you like to deploy the dashboard.
1
az account set --subscription "<your subscription>"
  1. Create a resource group, change the name rg-azdevops
1
az group create -l westeurope -n rg-azdevops
  1. Create an app service plan and webapp, change the names plan-azdevops and azdevops
1
2
3
az appservice plan create -g rg-azdevops -n plan-azdevops -l westeurope

az webapp create -g rg-azdevops -p plan-azdevops -n azdevops -r "DOTNET|6.0"
  1. Add your Azure DevOps URL and personal access token (PAT)
1
2
az webapp config appsettings set -g rg-azdevops -n azdevops --settings azDevOpsPat=<your token>
az webapp config appsettings set -g rg-azdevops -n azdevops --settings azDevOpsUri=https://dev.azure.com/<yourorgname>
  1. Set the always-on future we need for the WebJob
1
az webapp config set -g rg-azdevops -n azdevops --always-on true

Deploy the Azure DevOps Dashboard

Did you download the Azure DevOps Dashboard Release.zip package? After the installation we also run the WebJob for the first time, this can take a while depending on how many projects you have in your Azure DevOps organization account.

Authentication In the release package authentication is disabled! Please register your application first in your Azure Active Directory by following the steps described here. You only need to update the appsettings.json inside the release package.

1
2
3
az webapp deployment source config-zip -g rg-azdevops -n azdevops --src Release.zip

az webapp webjob triggered run -n azdevops -g rg-azdevops --webjob-name Webjob

Architecture

/azure-devops-dashboard/architecture.png

You can also run the WebJob locally, set the following two environment variable first azDevOpsUri and azDevOpsPat that corresponds with your Azure DevOps organization account:

1
2
SET azDevOpsPat=tjqp44k54nqfmppaqd7di27kpvh...........
SET azDevOpsUri=https://dev.azure.com/yourorgname.....

Using the API

To automate tasks, you can use the API to connect to Excel, Microsoft Power Automate, or whatever you need. The /api/data API will return a list of the following project properties:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
[
    {
        "projectId": "guid",
        "name": "project name",
        "description": "project description",
        "url": "https://dev.azure.com/projectname",
        "owners": [
            {
                "displayName": "Contoso Admin name",
                "mailAddress": "admin@contoso.com"
            }
        ],
        "processTemplate": "Scrum",
        "lastProjectUpdateTime": "2021-03-22T11:40:32.09Z",
        "lastCommitDate": "2020-04-23T18:00:27Z",
        "lastWorkItemDate": "0001-01-01T00:00:00",
        "lastKnownActivity": "2021-03-22T11:40:32.09Z",
        "projectAge": 83.92575148777316
    }
]

Source Code

Alle source code can be found on GitHub.