Azure DevOps Hour 1: Core Fundamentals

From “registering an organization” to “the team can collaborate”: platform overview, permissions, licensing, Boards, Repos, CLI/REST, Wiki and service hooks
Azure DevOps Servicesazure-devops CLI extension 1.0.11REST api-version 7.1Azure DevOps Server (25H2) Patch 9Verified against learn.microsoft.com · 2026-11
Prerequisites This lesson is the third course in the CI/CD platform group of the DevOps learning path (Linux → Bash → Git → Docker → Kubernetes → Terraform → Ansible → GitHub → GitLab → Azure DevOps → Jenkins → Azure Landing Zone → AKS → Helm → GitOps and Argo CD → Prometheus & Grafana). Pick one or two courses from this group. The Git internals, SSH/HTTPS/GCM authentication and the Git-side details of Azure Repos are covered in the Git 8-hour course(especiallyLesson 3) already. This lesson covers only the Azure DevOps platform side. For a comparison with GitHub organizations, teams and Actions, see the GitHub 8-hour course.
Overall learning objectives
  • Explain the Azure DevOps Services and Azure DevOps Server differences, draw the “organization → project → team” hierarchy, know what each of the five services (Boards / Repos / Pipelines / Test Plans / Artifacts) is for, and know when to choose GitHub, when to choose Azure DevOps, and when to combine the two.
  • Understand security groups, permission states (Allow / Deny / Not set / inherited / system), organization-level and project-level built-in groups, and be able to derive a user's effective permissions on any object the way the Azure DevOps permission engine does, and verify with the “Why?” trace and the CLI.
  • Distinguish access levels (Stakeholder / Basic / Basic + Test Plans) from permissions, work out per-user billing and the cost of parallel jobs , and use Entra group rules to assign licenses in bulk.
  • For a team, choose a process template (Basic / Agile / Scrum / CMMI), customize safely with inherited processes, and set up area paths, iteration paths, backlogs, sprints, queries and boards.
  • Configure branch policies on Azure Repos (minimum reviewers, linked work items, comment resolution, merge types, build validation), and use PRs to tie code to work items.
  • Script all of the above with az devops the CLI and REST API (PAT and Microsoft Entra token authentication), and close the team collaboration loop with Wiki, dashboards and service hooks.

Hour 1 time allocation

#TimeModuleCore contentAnimations / interactionsLab (project myapp-lab)
0Before classEnvironment setupCreate a free organization and project myapp-lab, install the Azure CLI + azure-devops extension, and import the myapp repositoryEnvironment self-check listaz devops project show Success
100–06Platform overview and architectureServices vs Server, organization/project/team, the five services, relationship with GitHub and how to choose, retirement of public projectsSelection decision toolBrowse organization and project structure
206–14Organizations, projects, security groups and permissionsPermission states, group and object inheritance, deny precedence, built-in groups, effective permission evaluation, Why? tracingCore animation: permission evaluation engineCreate custom groups, explicit deny, verify
314–20Access levels, licensing and billingStakeholder / Basic / Basic + Test Plans, first 5 free, parallel jobs, Entra group rulesCost calculatorAdd Stakeholder users, group rules
420–28Azure BoardsFour processes, inherited processes, work item hierarchy, area/iteration paths, backlogs, sprints, queries (WIQL), boardsWork item state transitions and board column mappingCreate areas, iterations, user stories, tasks
528–36Azure ReposBranch policies, PR lifecycle, merge types, linking work items with AB#, auto-completePR policy evaluatorAdd a policy to main and complete a PR
636–43az devops CLI and REST APIPAT vs Entra tokens,az boards/repos/pipelines,az devops invoke, api-version rulesFull path of a single REST requestCLI and curl dual-track queries
743–50Wiki, dashboards and service hooksProject Wiki vs code Wiki, dashboards and widgets, service hook subscriptions and deliveryService hook delivery and retriesCreate a Wiki, Webhook subscription
850–60Collaboration readiness review and troubleshooting basics12-item readiness review, TF401027/403, project not found, insufficient license, invalid PATInteractive troubleshooting treeDeliberately create 3 errors and fix them
—After classCheat sheet · Capstone labBuild a project from scratch with the CLI and verify with RESTFinal quiz (12 questions)Capstone lab

Knowledge Coverage Matrix

Target skillM1M2M3M4M5M6M7M8Key commandsLab
Explain platform hierarchy and service roles✓✓·····✓az devops project listModules 0, M1
Azure DevOps vs GitHub selection✓·✓·✓···—Selection decision tool
Derive effective permissions (inheritance / deny precedence)·✓·✓✓✓·✓az devops security permission showM2 lab
Manage security groups and members·✓✓··✓·✓az devops security groupM2, capstone lab
Access levels, licensing and cost··✓··✓·✓az devops user add/updateM3 lab
Process templates and work item tracking···✓✓✓✓·az boards work-item/area/iterationM4, capstone lab
Branch policies and PRs·✓··✓✓·✓az repos policy,az repos prM5, capstone lab
CLI / REST automation and authentication·····✓✓✓az devops invoke,curlM6, capstone lab
Wiki, dashboards, service hooks·····✓✓·az devops wiki,az devops invoke --area hooksM7 lab
Collaboration troubleshooting·✓✓·✓✓·✓--debug, Why?, audit logsM8 troubleshooting tree

Topics excluded from this lesson (and where to learn them)

TopicWhy it is not in this lessonWhere to learn it
Git object model, SSH/HTTPS/GCM authentication, Git-side limits of Azure Repos (250 GB repositories, 5 GB per push, SSH supports RSA only)Already covered in the Git course, not repeatedGit course, Lesson 3
YAML pipelines, triggers, agents and agent poolsCore of Azure PipelinesLesson 2
Service connections, workload identity federation, deployment to Azure / AWSRequires a cloud subscription and more timeLessons 3, 4
Templates, extends, protected resources, approvals and checksPart of pipeline governanceLessons 5, 6
Manual and exploratory testing details in Azure Test PlansRequires the Basic + Test Plans license ($52/user/month)Official Test Plans documentation
Azure Artifacts feeds, upstream sources, package retentionFits more naturally alongside pipelinesLessons 2, 5
GitHub Advanced Security for Azure DevOps, audit streamingPart of security and complianceLessons 6, 7

How to use this courseware

10 pages per module
Principles · diagrams · animations · commands · labs · production cases · troubleshooting · quizzes · narration · video. Read “Principles” and “Animations” first, then do the “Lab”. The permission evaluation animation in Module 2 is the core of this lesson.
Learning progress
A quiz score of ≥ 70% or clicking “Mark this module complete” counts toward progress, saved in this browser (if the browser blocks local storage, progress is cleared on refresh).
Chinese narration
The “Narration” page reads the script aloud with the browser's built-in Web Speech API (en-US); without a Chinese voice pack the script can still be read, or passed to a TTS tool.
Version notes This lesson follows Azure DevOps Services (cloud service, rolling releases) and was verified on 2026-11-15. The latest on-premises release is Azure DevOps Server (no longer carries a year; internal version 25H2, RTW released 2025-12-09, Patch 9 released 2026-10-13). The CLI uses azure-devops extension 1.0.11 (released 2026-11-10, requires Azure CLI 2.30.0 or later). REST examples use api-version=7.1 (GA); for preview features, use 7.2-preview.N. Public projects have been retired: new public projects can no longer be created, existing public projects will become private starting in 2027, so this lesson explains permissions and licensing entirely for private projects. Prices follow the official pricing page ; the figures in this lesson are the USD prices as of 2026-11.

Module 0 · Environment setup (complete before class)

Create a free organization and project myapp-lab, install the Azure CLI and the azure-devops extension, and import the myapp repository into Azure Repos
Before class ≈ 15 minThe free tier covers all labsNo Azure resource charges
Prerequisites
  • A Microsoft account (personal outlook.com etc.) or a Microsoft Entra ID work account. An organization created with a work account is automatically connected to that Entra tenant, which the “group rules” lab later requires.
  • A workstation with Git 2.4x (Windows 11 / macOS / Ubuntu 24.04 all work) with access to dev.azure.com.
  • (Optional) an Azure subscription: only needed if you want to enable the free parallel jobs for Microsoft-hosted agents (needed from Lesson 2 onward) or buy additional licenses; the labs in this lesson do not need it.
  • Completed Docker course 's myapp (Python Flask + gunicorn + Redis,/healthz) is better; if you don't have one, a minimal version is given below.

Step 1: Create a free organization

Open https://dev.azure.com → Start free, sign in with your account. On first sign-in you confirm the organization name (globally unique; it forms https://dev.azure.com/{organization-name}) and the hosting region (geographic location, which determines data residency; choose the region closest to your team, e.g. Canada / United States). In this lesson the organization name is written as $ORG, for example contoso-lab.
You automatically become the Organization owner, and are a Project Collection Administrators member of the organization. The organization owner can transfer ownership under Organization settings → Overview, but each organization has only one owner.
(Recommended) Check organization policies: Organization settings → Policies. Keep “Allow public projects” turned off (creating them is no longer possible); if the organization is connected to Entra, you can enable policies such as “Restrict creation of global PATs” (see Module 6).

Step 2: Create project myapp-lab

Web: organization home page → New project → Name myapp-lab, Visibility Private, Advanced → Version control Git, Work item process Agile (Module 4 explains why this one). You can also create it with a command once the CLI is installed in step 3:

az devops project create --name myapp-lab \
  --description "Azure DevOps 8h course lab" \
  --visibility private --source-control git --process Agile \
  --org https://dev.azure.com/$ORG

Step 3: Install the Azure CLI and the azure-devops extension

Windows (winget)
winget install --exact --id Microsoft.AzureCLI
# Reopen the terminal
az version
Ubuntu 24.04 / macOS
# Ubuntu: Microsoft's official one-line script (requires sudo)
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# macOS
brew update && brew install azure-cli
az version
az extension add --name azure-devops      # If already installed, use az extension update --name azure-devops
az extension show --name azure-devops --query version -o tsv

# Sign in: preferably interactive sign-in with Microsoft Entra / Microsoft account (az devops commands reuse the az login token)
az login --allow-no-subscriptions         # Without an Azure subscription, --allow-no-subscriptions is required

# Set the default organization and project; later commands then need no --org / --project
az devops configure --defaults organization=https://dev.azure.com/$ORG project=myapp-lab
az devops configure --list
1.0.11
[defaults]
organization = https://dev.azure.com/contoso-lab
project = myapp-lab
Environments that can only use a PAT (for example a jump box with no browser): az devops login --organization https://dev.azure.com/$ORG then paste the PAT, or set an environment variable AZURE_DEVOPS_EXT_PAT. For PAT risks and alternatives, see Module 6.

Step 4: Import the myapp repository

A new project automatically creates an empty repository with the same name as the project myapp-lab. We create another myapp repository and import the code:

# Option A: import from your myapp repository on GitHub (a public repository needs no credentials)
az repos create --name myapp
az repos import create --git-source-url https://github.com/<your-account>/myapp.git --repository myapp

# Option B: if no existing repository is available locally, create a minimal myapp and push it
mkdir myapp && cd myapp && git init -b main
cat > app.py <<'EOF'
import os, redis
from flask import Flask
app = Flask(__name__)
r = redis.Redis(host=os.getenv("REDIS_HOST", "redis"), port=6379)
@app.get("/")
def index():
    return f"Hello from myapp, visits={r.incr('hits')}\n"
@app.get("/healthz")
def healthz():
    return "ok\n"
EOF
printf 'flask==3.1.*\ngunicorn==23.*\nredis==5.*\n' > requirements.txt
git add . && git commit -m "myapp: minimal Flask + Redis"
git remote add origin "$(az repos show --repository myapp --query remoteUrl -o tsv)"
git push -u origin main
{
  "repository": { "name": "myapp", ... },
  "status": "completed"
}

To import a private GitHub repository, add --requires-authorization, and provide the source-side token through AZURE_DEVOPS_EXT_GIT_SOURCE_PASSWORD_OR_PAT an environment variable. The import is a one-time copy and does not stay in sync. For Git authentication when pushing (GCM uses OAuth tokens by default), see Git course, Lesson 3.

Step 5: Verify

az devops project show --project myapp-lab --query "{name:name, visibility:visibility, process:capabilities.processTemplate.templateName}" -o table
az repos list --query "[].{name:name, defaultBranch:defaultBranch, size:size}" -o table
Name       Visibility    Process
---------  ------------  ---------
myapp-lab  private       Agile

Name       DefaultBranch    Size
---------  ---------------  ------
myapp      refs/heads/main  2817
myapp-lab                   0

Environment self-check list

Costs and risks All labs in this lesson stay within the free tier: the first 5 Basic users are free, Stakeholders are free with no user limit, and Boards/Repos are free. Do not buy parallel jobs or Basic + Test Plans in the lab organization, and do not commit PATs to a repository. After the course, you can delete the organization under Organization settings → Overview → Delete organization (recoverable for 28 days after deletion).

Module 1 · Azure DevOps platform overview and architecture

00:00 – 06:00 · One organization, multiple projects, multiple teams per project; five services switched on as needed; GitHub is a “sibling”, not an either/or choice
6 minServices GA · Server 25H2Public projects have been retired★★★★☆
Learning objectives
  • Distinguish Azure DevOps Services (SaaS) from Azure DevOps Server (self-hosted), and know how the two differ in identity, update cadence and licensing.
  • Draw the organization (equivalent to a project collection in the on-premises version) → project → team three-level structure, and explain which settings belong at which level.
  • Explain the roles of Boards / Repos / Pipelines / Test Plans / Artifacts, and justify a GitHub, Azure DevOps or hybrid choice for a team.
Prerequisites: Git basics; familiarity with GitHub organizations and repositories helps. Importance:★★★★☆ (the “map” for all later modules)

What: what Azure DevOps is

Azure DevOps is Microsoft's integrated software delivery platform, made up of five services that can each be enabled or disabled separately: Azure Boards (work tracking),Azure Repos (Git and TFVC code hosting),Azure Pipelines (CI/CD),Azure Test Plans (manual and exploratory testing),Azure Artifacts (feeds for NuGet, npm, Maven, Python, Cargo and generic packages). Its predecessors were Team Foundation Server (TFS) and Visual Studio Team Services (VSTS); it was renamed to its current name in 2018.

Azure DevOps ServicesAzure DevOps Server
DeploymentMicrosoft-hosted SaaS, entry point https://dev.azure.com/{org} (legacy address {org}.visualstudio.com still works)Your own Windows Server + SQL Server, entry point https://server/{collection}
Top-level containerOrganizationProject collection; there can be several
IdentityMicrosoft account or Microsoft Entra IDActive Directory / workgroup accounts
UpdatesRolling release about every three weeks (one sprint), with release notesInstalled and patched by version: the latest is Azure DevOps Server (25H2, RTW 2025-12, Patch 9 in 2026-10)
Process customizationInherited processInherited process or on-premises XML process model
LicensingBilled monthly per user + parallel jobs, paid through an Azure subscriptionServer license + client access licenses (CAL); self-hosted parallel jobs are not charged extra
Best forMost teams; needs zero operations and automatically receives new featuresData must stay in an in-house datacenter, on an isolated network, with strict regulatory requirements

Why: why there are three levels, “organization / project / team”

  • Organization is the boundary for billing, identity (which Entra tenant is connected), organization-level policies, parallel jobs, extensions, agent pools and process templates. All projects share these.
  • Project is the main boundary for security and data: repositories, pipelines, work items, Wiki, service connections, and area and iteration paths all belong to a project. Cross-project work item links and queries are possible, but permissions are usually granted per project.
  • Team is not a security boundary but a “view and cadence”: each team has its own area paths (which work items it sees), iterations (which sprints it takes part in), backlogs, boards, dashboards and notifications. Creating a team also creates a security group of the same name ([myapp-lab]\web Team), which by default is a member of Contributors.

How: how a request is located inside the platform

When accessing https://dev.azure.com/contoso-lab/myapp-lab/_workitems/edit/42 , the following happens: (1) the global entry point finds the service instance in the geographic location of the organization from the first segment of the URL; (2) the identity is verified (browser session, Entra token or PAT); (3) it checks that the identity is a valid user of the organization (Project Collection Valid Users) and its access level; (4) it finds the project by name and checks View project-level information; (5) it finds the area path of work item 42 and checks View work items in this node; (6) it returns the data. The Module 2 animation expands on the permission evaluation in steps 3–5.

Where the five services fit

ServiceProblem it solvesCore objectsCommon alternatives / comparisonsWhere it is covered in this course
BoardsRequirements, defects, sprint plans, boards, delivery plansWork items, area/iteration paths, queriesGitHub Issues + Projects, JiraModule 4
ReposPrivate Git repositories (unlimited number), PRs, branch policies; legacy TFVCRepositories, branches, PRs, policiesGitHub, GitLabModule 5; Git side covered in the Git course
PipelinesCI/CD; can build Azure Repos, GitHub, Bitbucket and other repositoriesPipelines, stages, jobs, agent pools, environmentsGitHub Actions, JenkinsLessons 2–7
Test PlansManual test cases, test suites, exploratory testingTest plans, suites, cases, runsTestRail, XrayRequires Basic + Test Plans
ArtifactsPrivate package feeds, upstream source cachingFeeds, views, upstream sourcesGitHub Packages, JFrogLessons 2, 5

When: relationship with GitHub and selection

GitHub and Azure DevOps both belong to Microsoft. Microsoft's official position is that new developer-experience investment mainly goes to GitHub, Azure DevOps continues to receive support and feature updates, and the two are deeply integrated: Azure Boards can connect to GitHub repositories (writing AB#123 in a commit or PR description links the work item), and Azure Pipelines can build GitHub repositories,GitHub Enterprise users automatically get Basic access to Azure DevOps (the “GitHub Enterprise” access level, equivalent to Basic).

Leaning toward Azure DevOpsLeaning toward GitHubCommon hybrid setups
Need for hierarchical requirements management (Epic → Feature → Story → Task), formal processes such as CMMI, delivery plans; large amounts of TFVC or classic release assets; must be self-hosted (Server); manual testing with Test PlansOpen source and inner source, developer experience, native Copilot and Advanced Security experience, Actions marketplace, CodespacesCode and Actions on GitHub, planning in Azure Boards; or code on GitHub and deployment with Azure Pipelines approvals and environments

Migration path: GitHub Enterprise Importer can move code, PRs and branch policies from Azure Repos to GitHub Enterprise Cloud, but it does not migrate pipelines or LFS objects; a separate guide, “Migrating public projects to GitHub”, is in the public project retirement documentation.

Common misconceptions① “Azure DevOps is being replaced by GitHub, so there is no need to learn it” — it still ships continuously (in 2026 it still updates with sprint release notes, and Server still receives patches), many enterprises use it, and the GitHub Enterprise license itself includes it. ② “The team is the permission boundary” — a team is only a view and cadence; the real permissions sit on security groups, projects and objects. ③ “Each product needs its own organization” — most companies need only one organization, split by project or team; multiple organizations make billing, policies and cross-project queries harder. ④ “Azure DevOps requires an Azure subscription” — Boards, Repos and the free tier do not; a subscription is only needed for paid purchases or to enable the free hosted-agent allowance.

Architecture diagram: organization, projects, teams and the five services

Organization contoso-lab (dev.azure.com/contoso-lab) Billing (Azure subscription) · connected Entra tenant · users and access levels · organization-level security groups · policies · process templates · extensions · agent pools · parallel jobs Project myapp-lab (private · Git · Agile process) Project-level security groups · area/iteration paths · service connections · Wiki · dashboards Boards Repos Pipelines Test Plans Artifacts Team myapp-lab Team (default) Area: myapp-lab (including sub-areas)Iterations: Sprint 1..3Backlogs · boards · dashboards Team web Area: myapp-lab\webIterations: Sprint 1..3Security group [myapp-lab]\web Team Project platform (another project) Separate repositories, pipelines, work items and permissions Unused services can be turned off (Project settings → Overview → Azure DevOps services) Across projects: work item links, queries, pipeline resources Integrations (both from Microsoft) GitHub repository ↔ Azure Boards (AB#123 links) Azure Pipelines builds GitHub repositories (GitHub App) GitHub Enterprise license → Azure DevOps Basic
Figure 1-1: the organization is the billing and identity boundary, the project is the data and security boundary, and the team is the view and cadence

Workflow diagram: how the five services hand off from requirements to release

BoardsUser Story #42Sprint 1 · web team Reposfeature/42 → PRPolicy: review + link #42 PipelinesBuild validation (PR)CI/CD after merge Artifactswheel / container image(images are often stored in ACR) Test PlansManual regressionResult written back to #42 Traceability: the Development / Deployment area on a work item shows the linked branches, commits, PRs, builds and releases
Figure 1-2: work items are the main thread that ties everything together; PRs, builds and deployments can all link back to them

Step-by-step animation: how a Web/REST request is routed and authorized

Using GET https://dev.azure.com/contoso-lab/myapp-lab/_apis/wit/workitems/42?api-version=7.1 as the example. Each step highlights the matching component; the terminal below shows the real observable effects (HTTP status codes, response headers, error messages).

Ready. Choose an identity, then press Play.
$ curl -s -H "Authorization: Bearer $TOKEN" "https://dev.azure.com/contoso-lab/myapp-lab/_apis/wit/workitems/42?api-version=7.1"

Interactive: GitHub or Azure DevOps?

Tick the team's actual constraints; the right side gives a recommendation and reasons (based on the official positioning in the “When” section of this module).

Tick the conditions on the left…

Command table

CommandPurposeKey parameters
az devops project listList projects in the organization--state-filter,--top
az devops project showview project details (process, visibility, default team)--project
az devops team list / createlist / create teams--name,--description
az devops team list-memberlist team members--team
az devops invoke --area core --resource projectscall REST resources directly (anything the CLI does not wrap)--route-parameters,--api-version
az devops extension listlist Marketplace extensions installed in the organization--include-built-in
az devops project list --query "value[].{name:name, visibility:visibility, lastUpdate:lastUpdateTime}" -o table
az devops project show --project myapp-lab --query "{id:id, defaultTeam:defaultTeam.name, process:capabilities.processTemplate.templateName, vc:capabilities.versioncontrol.sourceControlType}"
az devops team list --query "[].{name:name, id:id}" -o table
Name       Visibility    LastUpdate
---------  ------------  ----------------------------
myapp-lab  private       2026-11-15T08:12:40.1+00:00
{
  "defaultTeam": "myapp-lab Team",
  "id": "8c0e6c5d-3f0a-4b9e-9a39-6a6bb1a7b0f1",
  "process": "Agile",
  "vc": "Git"
}
Name            Id
--------------  ------------------------------------
myapp-lab Team  0b5e1d1e-6b4c-4d6e-8a5e-7c2c1f0d9a11

How to verify: In the web UI, Project settings → Overview should show the same process and visibility. Common errors: Empty result: the default organization is wrong, or you have no project permissions in that organization (see Module 8). Production use: Export the project list and last-updated dates each week, and archive projects that have been unused for a long time.

Turn off unused services (less noise and attack surface)

# Web: Project settings → Overview → Azure DevOps services → turn off Test Plans / Artifacts
# There is no dedicated CLI subcommand for service toggles; once turned off the menu is hidden but existing data is kept and can be re-enabled at any time
Tip CLI's --query uses JMESPath; az devops project list results are wrapped in a value array, whereas most other az devops commands return arrays directly, so look at the structure before writing a query. -o json first.

Goal: Learn the structure of myapp-lab and create a second team, web. Environment: The organization and CLI completed in Module 0. Cost: None.

View organization-level information: Organization settings → Overview, note the geographic location; Organization settings → Microsoft Entra, check whether a tenant is connected.
az devops invoke --area core --resource projects --route-parameters projectId=myapp-lab --api-version 7.1 --query "{name:name, state:state, revision:revision}"
Create team web (this also creates a security group of the same name):
az devops team create --name web --description "Web front-end team"
az devops team list -o table
Name            Description
--------------  -------------------------
myapp-lab Team  The default project team.
web             Web front-end team
Verify the team security group:
az devops security group list --project myapp-lab --query "graphGroups[].principalName" -o tsv
[myapp-lab]\Build Administrators
[myapp-lab]\Contributors
[myapp-lab]\myapp-lab Team
[myapp-lab]\Project Administrators
[myapp-lab]\Project Valid Users
[myapp-lab]\Readers
[myapp-lab]\Release Administrators
[myapp-lab]\web

The principalName of the team security group is the team name (shown in the web UI as the “web Team” view). By default it is added to Contributors.

Browse the five services: open Boards → Work items, Repos → Files, Pipelines, Test Plans and Artifacts in turn, and confirm each service is in the project context.
Cleanup: keep the web team; later modules continue to use it.

Case 1: a company with 37 organizations

Problem: Each department registered its own organization, causing duplicate license billing (the same person held a Basic license in 5 organizations), inconsistent policies, and no cross-department queries. Approach: After connecting to a single Entra tenant, download the organization list under Organization settings → Microsoft Entra; merge into 3 organizations by business line; migrate projects by repository import plus work item migration with CSV/tools. Configuration: Entra tenant policy “Restrict organization creation” (only designated groups may create organizations). Limits: Work item history and pipeline run records cannot be migrated losslessly, so the old organization must be kept read-only for a period.

Case 2: code moves to GitHub, planning stays in Boards

Problem: Developers want GitHub Copilot, Codespaces and Actions, while the project manager relies on the Epic/Feature hierarchy and delivery plans in Boards. Approach: GitHub Enterprise Importer migrates repositories and PRs; Project settings → GitHub connections connects the GitHub organization; PR descriptions write AB#1234, which shows the GitHub PR in the work item's Development area. Limits: Pipelines are not migrated with GEI; they must be rewritten as Actions, or Azure Pipelines keeps building the GitHub repositories.

Case 3: on-premises deployment for a regulated industry

Problem: Source code must not leave the country, and the network is isolated from the internet. Approach: Azure DevOps Server (25H2) + SQL Server 2025, with patches installed monthly (security patches were released every month in 2026). Limits: No Microsoft-hosted agents, so self-hosted agents must be built; new features arrive later than in the cloud service; backup and high availability are your own responsibility.

Common errors and fixes

TF400813: The user 'xxx' is not authorized to access this resource.

Cause: The account is not in the organization (never added, or removed), or the wrong account was used (a personal MSA with the same email as a work account).

az account show --query user          # Who is currently signed in to the CLI
az devops user show --user you@contoso.com   # Requires an administrator to run

Fix: Have an organization administrator add you under Organization settings → Users; sign in again in an InPrivate window and confirm you chose the right account type.

There were errors in your request: Organization 'contoso-lab' not found / page shows “The resource cannot be found”

Cause: The organization name is misspelled, the organization was deleted (recoverable within 28 days), or it was renamed (the old URL stops working after a rename).

az devops configure --list
curl -s -o /dev/null -w "%{http_code}\n" https://dev.azure.com/contoso-lab/_apis/connectionData

Fix: Go to https://aex.dev.azure.com (the “My organizations” page) to see the organizations you can access, and update the default.

No Test Plans / Artifacts in the project's left menu

Cause: The service has been turned off in project settings, or your access level does not support it (Test Plans needs Basic + Test Plans; Stakeholders cannot see Repos).

Fix: A project administrator turns the service on under Project settings → Overview; for access level issues see Module 3.

The New project page has no “Public” option

Cause: Public projects have been retired and can no longer be created; existing public projects become private starting in 2027.

Fix: Put open-source projects on GitHub; for public documentation use GitHub Pages or another site.

Command-line questions
1. Write one command that prints the name of the process template used by myapp-lab.
az devops project show --project myapp-lab --query capabilities.processTemplate.templateName -o tsv
2. Create a team named api and list its members.
az devops team create --name api
az devops team list-member --team api -o table
Scenario analysis questions
A company of 200 people has already bought GitHub Enterprise Cloud, and the product manager insists on using the Epic/Feature hierarchy and delivery plans of Azure Boards. Does it need to buy Azure DevOps Basic for the 200 people as well? How should it be set up?

No. The GitHub Enterprise license includes Basic access to Azure DevOps (shown as the “GitHub Enterprise” access level), and users are recognized within 24 hours of signing in. Setup: one Azure DevOps organization connected to the same Entra tenant; Project settings → GitHub connections connects the GitHub organization; developers work on GitHub and write AB#id in the PR description; the few people who need Test Plans are assigned Basic + Test Plans separately.

Verified teaching videos

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
Official Microsoft channel, with April Edwards and TechWorld with Nana · about 2 hours · English · demonstrates all five services one by one, a good overview supplement to this lesson (recorded in 2023; the interface and prices follow this lesson)
▶
Azure DevOps Tutorial for Beginners | CI/CD with Azure Pipelines — TechWorld with Nana
English · the opening covers “What is Azure DevOps”, Boards and Repos; the second half covers Pipelines (see Lesson 2)

Official documentation

Storyboard script (about 90 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided, which can be handed to a video tool.

Shot 1 · 0–20s
On screen: a large box labeled “Organization contoso-lab”, with billing, Entra, policies and agent pools listed around its edges.
Narration: the organization is the outermost layer; all billing, identity and policy decisions are made at this layer.
Shot 2 · 20–45s
On screen: two project boxes appear inside the organization box, each with five service icons lit up.
Narration: the project is the main boundary for data and permissions; each project has Boards, Repos, Pipelines, Test Plans and Artifacts, which can be turned off as needed.
Shot 3 · 45–65s
On screen: the project box splits into two teams, each with its own board and sprint calendar.
Narration: a team is not a permission boundary but a view and cadence: it decides which work items you see and which sprints you join.
Shot 4 · 65–90s
On screen: an AB# link and a pipeline arrow drawn between the GitHub icon and the Azure DevOps icon.
Narration: GitHub and Azure DevOps can be used together: code on GitHub, planning in Boards, and the GitHub Enterprise license includes basic Azure DevOps access.
or score ≥ 70% on the quiz

Module 2 · Organizations, projects, security groups and permissions

06:00 – 14:00 · Permissions are granted to groups, not people; within the same level, deny takes precedence; on the object tree, the “closest explicit setting” overrides inheritance; Not set means nothing
8 minCore animationChanging one group affects all its members★★★★★
Learning objectives
  • State the meaning of the seven permission states (Allow, Allow (inherited), Allow (system), Deny, Deny (inherited), Deny (system), Not set).
  • Remember the default security groups at project and organization level, and know what Project Collection Administrators and Project Administrators each manage.
  • Derive effective permissions in this order: expand group membership → resolve inheritance along the object tree → merge multiple groups (deny precedence) → treat Not set as no permission → layer on the access level; verify with Why? and the CLI.
Prerequisites: The level structure from Module 1. Importance:★★★★★ (permission problems are the number-one source of collaboration tickets)

What: three independent control planes

Control planeQuestion it answersWhere it is setExample
Membership (Membership)Which security groups do you belong to?Organization/project settings → Permissions → Groups → Membersalice belongs to [myapp-lab]\Contributors and Contractors
Permissions (Permissions)What can this group do on this object?The Security page of the organization / project / object (repositories, branches, area paths, query folders, pipelines …)Contractors: Contribute = Deny on the myapp repository
Access level (Access level)Which web features can you use?Organization settings → Users (Module 3)A Stakeholder cannot see Repos in a private project

The three work together as an AND: a feature the access level does not support cannot be used even if the permission is granted; without the permission, a higher access level does nothing.

Permission states

StateMeaning
AllowExplicitly granted at the current scope
Allow (inherited)Inherited from a parent scope or from a group membership
Allow (system)Granted and managed by Azure DevOps; cannot be edited
DenyExplicitly denied at the current scope
Deny (inherited)Denied, inherited from a parent scope or group
Deny (system)Denied by the system; cannot be edited
Not setNeither allowed nor denied at the current scope; decided by other assignments; if everywhere is Not set, the result is no permission (implicit deny)

Why: why the evaluation order matters

Questions like “I'm in Contributors, so why can't I push?” are, 90% of the time, caused by: the user is also in another group that is explicitly denied on the same scope; or a closer explicit setting on a branch overrides the repository-level inheritance. Looking only at one group's permission page never reveals the cause; you must derive it following the engine's order, or use Why? (permission tracing).

How: the effective permission evaluation process (based on the official About permissions documentation)

  1. Expand the identity: the user themselves + directly held groups + nested groups + groups brought in by Entra groups (changes to Entra groups sync within about an hour; sign out and back in, or trigger a re-evaluation manually). Every user added to any group is also in Project Collection Valid Users / Project Valid Users.
  2. Resolve inheritance along the object tree (done separately for each identity): area paths, iteration paths, version-control folders, Git repositories → branches, query folders, pipeline folders and similar objects form a hierarchy. A parent's settings are inherited by all children,unless the identity has an explicit setting on the child—in which case the explicit value on the child replaces the value inherited from the parent. Official example: for area-1 an explicit Deny on area-1/sub-area-1 and an explicit Allow on sub-area-1 , the user gets Allow on
  3. Merge multiple identities over the resulting scope: within the same scope, any group's Deny generally takes precedence over Allow in other groups; Not set neither grants nor overrides.
  4. Result: Allow and no Deny → allowed; any Deny → denied; all Not set → no permission.
  5. Layer on access levels and system rules: for example, a Stakeholder in a private project cannot access Repos even if the permission allows it; Allow/Deny (system) entries cannot be changed.

Default security groups

Project level (one set per project)Organization level (one set per organization)
Project Administrators (manage the project: teams, areas/iterations, repositories, service hooks, service connections)
Contributors (read and write code, work items, pipelines — most members go here)
Readers (read-only)
Build Administrators, Release Administrators
Project Valid Users (maintained by the system; do not change)
Team name Team (one is added for each team created)
Project Collection Administrators (PCA: manage the organization — projects, policies, processes, retention policies, agent pools, extensions; the organization owner is automatically included)
Project Collection Build Administrators
Project Collection Build Service Accounts / Service Accounts / Proxy Service Accounts / Test Service Accounts
Project Collection Valid Users (maintained by the system; do not change)
Project-scoped Users (for the “limit user visibility” preview feature)
Security Service Group

Security groups are actually all managed at the organization level (even when used by only one project); some groups are hidden in the web UI, but all are visible through the CLI or REST. Besides roles, some resources use role-based permissions: Artifacts feed roles, extension managers, pipeline resource roles (agent pools, environments, service connections), and team administrators.

When: best practices

  • Grant permissions only to groups (preferably Entra groups), not directly to individuals; do not create a new group when a default group will do.
  • When a few people must not be able to do something, create a custom group and set an explicit Deny, rather than changing Contributors.
  • Do not change the default permissions of the Valid Users groups: denying “View project-level information” would lock everyone out of the project.
  • Keep PCA membership as small as possible (2–3 people recommended, using protected administrator accounts).

Comparison with GitHub

Azure DevOpsGitHub
ModelFine-grained bit permissions (dozens of bits per security namespace) + Allow/Deny/Not set + inheritancePredefined roles (Read/Triage/Write/Maintain/Admin) + custom repository roles; grant only, no explicit deny
Conflicts between groupsDeny takes precedence within the same scopeThe highest role wins
Branch protectionBranch policies + branch-level permissions (can deny force push, etc.)Rulesets / branch protection rules
Common misconceptions① “Project Administrators can manage the organization” — no; project administrators manage only the project; creating projects, changing processes and installing extensions require PCA. ② “Not set means allowed” — Not set is nothing; if every identity is Not set, there is no permission. ③ “An Allow on a child node always overrides a parent's Deny” — this holds only for the same identity; if another group denies on the same scope, Deny still takes precedence. ④ “Removing someone from an Entra group takes effect immediately” — Azure DevOps syncs in about an hour, and tokens and sessions may still cache the old groups; have the user sign in again if necessary.

Structure diagram: identities, groups, objects and permission bits

aliceBasic access level [myapp-lab]\ContributorsDirect member [myapp-lab]\ContractorsJoined via Entra group sg-vendors Project Valid UsersAdded automatically by the system Security namespace: Git Repositories repoV2/{projectId} (all repositories in the project)Contributors: Contribute = Allow repoV2/{projectId}/{repoId} (myapp)Contractors: Contribute = Deny …/{repoId}/refs/heads/mainContributors: Force push = Deny Example permission bits (bitmask): Administer=1 · GenericRead=2 GenericContribute=4 · ForcePush=8 · CreateBranch=16 PullRequestContribute=16384 · PolicyExempt=128
Figure 2-1: each object is a token in some security namespace; an ACL attaches “identity descriptor → allow/deny bitmask” to the token, and child tokens inherit from the parent token by default

Flow diagram: effective permission evaluation

① Expand the identityuser + groups + nested groups+ Entra groups ② For each identity, walk the object treetake the explicit value closest to the targetotherwise inherit from the parent ③ Merge the identitiesany Deny → Denyotherwise any Allow → Allow ④ All Not set= no permission(implicit deny) ⑤ Access levelwhether the feature is available→ final result Verification: the “Why?” beside each permission on the Security page (permission tracing) shows which group and which scope determined the result
Figure 2-2: evaluation order: first resolve “inheritance” along the object tree, then resolve “conflicts between groups” on the same scope

Core animation: permission evaluation engine

Choose a scenario and play it step by step: user → groups they belong to → each group's explicit Allow / Deny at each level → each group's value after resolving the object tree → merge (deny precedence) → layer on the access level → final result. You can also click cells in the table to cycle through “· / Allow / Deny” and experiment yourself.

Ready.
Allow (explicit)Deny (explicit)Currently evaluatingValue adopted

Command table

CommandPurposeKey parameters
az devops security group listList project-level or organization-level security groups--project or --scope organization
az devops security group createCreate a custom group--name,--project,--description
az devops security group membership add / list / removeManage group members--group-id (descriptor),--member-id (email or descriptor)
az devops security permission namespace listList security namespaces and their bit definitions--query
az devops security permission showView the effective permissions of a principal on a token--id (namespace),--subject,--token
az devops security permission update / resetSet allow/deny bits, or reset to Not set--allow-bit,--deny-bit,--permission-bit
# 1) Find the Git Repositories namespace and its bit definitions
az devops security permission namespace list \
  --query "[?name=='Git Repositories'].{id:namespaceId, actions:actions[].{name:name, bit:bit}}" -o json

# 2) Build the token: repoV2/{projectId}/{repoId}
PROJ_ID=$(az devops project show --project myapp-lab --query id -o tsv)
REPO_ID=$(az repos show --repository myapp --query id -o tsv)
GIT_NS=2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87
TOKEN="repoV2/$PROJ_ID/$REPO_ID"

# 3) View alice's effective permissions (the result resolves to Allow / Deny / inherited)
az devops security permission show --id $GIT_NS --subject alice@contoso.com --token "$TOKEN" \
  --query "[0].acesDictionary.*.resolvedPermissions[].{name:displayName, effective:effectivePermission}" -o table
Name                                  Effective
------------------------------------  ----------------
Contribute                            Deny (inherited)
Create branch                         Allow (inherited)
Read                                  Allow (inherited)
Force push (rewrite history ...)      Not set
...

How to verify: Web: Project settings → Repositories → myapp → Security → select the user → the icon next to Contribute Why?, should show “Deny inherited from [myapp-lab]\Contractors”. Common errors:--subject Using a display name will fail; use an email or descriptor. The branch part of the token is an encoded string, so first az devops security permission list --id $GIT_NS --subject ... --recurse look up the existing token and reuse it. Production use: Scripted audit: iterate over all repositories and find ACEs granted directly to individuals.

# Create a custom group, add members, then explicitly deny Contribute on the repository (bit 4)
az devops security group create --name Contractors --project myapp-lab --description "External vendors"
GRP=$(az devops security group list --project myapp-lab --query "graphGroups[?displayName=='Contractors'].descriptor" -o tsv)
az devops security group membership add --group-id "$GRP" --member-id alice@contoso.com
az devops security permission update --id $GIT_NS --subject "$GRP" --token "$TOKEN" --deny-bit 4
# Revert: reset to Not set
az devops security permission reset --id $GIT_NS --subject "$GRP" --token "$TOKEN" --permission-bit 4

Goal: Reproduce the situation of “in Contributors but cannot push” yourself, and explain it using Why? and the CLI. Environment: myapp-lab, ideally with a second test account (called alice below); without a second account you can still observe the permission results with the CLI alone. Cost: None (the first 5 Basic users are free).

Add alice to the organization and put her in Contributors:
az devops user add --email-id alice@contoso.com --license-type express --send-email-invite false
CONTRIB=$(az devops security group list --project myapp-lab --query "graphGroups[?displayName=='Contributors'].descriptor" -o tsv)
az devops security group membership add --group-id "$CONTRIB" --member-id alice@contoso.com

--license-type express i.e. Basic (the older name used in the CLI),stakeholder i.e. Stakeholder,advanced i.e. Basic + Test Plans.

Create the Contractors group, add alice, and explicitly deny Contribute on the myapp repository: run the last block of code on the “Commands” page.
Verify: when alice pushes a branch it should fail:
remote: TF401027: You need the Git 'GenericContribute' permission to perform this action. Details: identity 'alice@contoso.com', scope 'repository'.
To https://dev.azure.com/contoso-lab/myapp-lab/_git/myapp
 ! [remote rejected] feature/x -> feature/x (TF401027: ...)
Web: Security → alice → Contribute → Why? shows Deny from Contractors.
Compare object inheritance: reproduce the official example on Boards area paths — Project settings → Boards → Project configuration → Areas, create myapp-lab\legacy and myapp-lab\legacy\hotfix; for Contractors, on legacy deny “Edit work items in this node”, and on legacy\hotfix allow. alice can edit work items under hotfix but not under legacy.
Cleanup:
az devops security permission reset --id $GIT_NS --subject "$GRP" --token "$TOKEN" --permission-bit 4
az devops security group delete --id "$GRP" --yes

Case 1: contractors may only change the front-end code

Problem: An outsourcing team needs access to the web repository but must not see the payments repository. Approach: Entra group sg-vendors → Azure DevOps group Contractors (not added to Contributors); on the web repository, allow Read + Contribute for Contractors; set nothing on the payments repository (Not set = no permission). Turn on the organization preview feature “Limit user visibility” and place Contractors in Project-scoped Users. Limits: This preview feature only restricts the web portal; some data is still visible through REST or the CLI, so sensitive code is best kept in a separate project.

Case 2: “View project-level information” on Valid Users was accidentally set to Deny

Problem: Everyone (including administrators) gets “VS800075: The project … does not exist, or you do not have permission to access it” when opening the project. Approach: A PCA restores the entry to Not set/Allow via Organization settings → Permissions or REST. Prevention: The documentation clearly advises not to change the default permissions of the Valid Users group; permission changes go through auditing (Organization settings → Auditing) and change review.

Case 3: prevent anyone from force-pushing to main

Problem: Someone git push --force overwrote main. Approach: In main's Security settings, explicitly deny “Force push” to Contributors and Project Administrators, then add a branch policy that enforces PRs (Module 5). Limits: The Bypass policies permission is not granted to any group by default; the emergency path is given only to a dedicated group, with audit alerts enabled.

Common errors and fixes

TF401027: You need the Git 'GenericContribute' permission to perform this action.

Cause: The effective Contribute permission is not Allow: a group the user belongs to is denied on the repository or branch, or the user is only in Readers.

az devops security permission show --id 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87 --subject user@contoso.com --token "repoV2/$PROJ_ID/$REPO_ID" -o table

Fix: Use Why? to find the source of the deny; remove the user from that group or set it to Not set. Branch-level denies must be checked in the branch's Security settings.

VS800075: The project with id 'vstfs:///Classification/TeamProject/…' does not exist, or you do not have permission to access it.

Cause: The user is not a project member (lacks View project-level information), or the project has been deleted or renamed.

Fix: A project administrator adds the user to Readers/Contributors; check whether Valid Users has been denied by mistake; the project recycle bin can restore a deleted project within 28 days.

The user was added to the group, but the permission still does not take effect

Cause: Changes to Entra groups sync within about an hour; browsers and tokens cache old group membership.

Fix: Have the user sign out and sign back in, or trigger “Re-evaluate permissions” under User settings → Permissions; use az devops security group membership list --id <user-descriptor> --relationship memberof to confirm the membership.

Project administrators cannot see the “New project” or “Process” settings

Cause: These are organization-level operations, which require Project Collection Administrators (or the corresponding organization-level permission).

Fix: Have a PCA do it, or grant the “Create new projects” organization-level permission to a dedicated group.

Command-line questions
1. List the members of the Project Administrators group in myapp-lab.
PA=$(az devops security group list --project myapp-lab --query "graphGroups[?displayName=='Project Administrators'].descriptor" -o tsv)
az devops security group membership list --id "$PA" -o table
2. Restore the Contribute permission of the Contractors group on the myapp repository to Not set.
az devops security permission reset --id 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87 --subject "$GRP" --token "repoV2/$PROJ_ID/$REPO_ID" --permission-bit 4
Scenario analysis question
bob is in both Contributors (repository-level Contribute = Allow) and Auditors (Contribute = Deny across all repositories in the project). The project administrator explicitly set Allow for Auditors on the myapp repository. Can bob now push to myapp? Why?

Yes. For the Auditors identity, the explicit Allow on the myapp repository replaces the Deny inherited from “all repositories” (an explicit value on a child overrides the inherited value from the parent); Contributors is also Allow on myapp; after merging there is no Deny, so the result is Allow. If a third group denies on myapp, Deny takes precedence.

Verified teaching videos

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
English · the demonstration includes browsing organization and project settings, which helps in understanding the hierarchy of settings alongside this module

No video specifically explaining “permission inheritance and deny precedence” that can be verified via oEmbed was found; follow the official documentation and this module's animation.

Official documentation

Storyboard script (about 100 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–20s
On screen: user alice's avatar, with three lines reaching out to three groups.
Narration: the first step of the permission engine is to expand the user into all the groups they belong to, including groups joined indirectly through Entra groups.
Shot 2 · 20–50s
On screen: an object tree: all repositories → myapp → main branch; each group carries green Allow or red Deny tags at different levels.
Narration: the second step, each group searches up the object tree on its own; the closest explicit setting takes effect, otherwise the parent is inherited.
Shot 3 · 50–80s
On screen: the results of three groups converge into one funnel, with red Deny overpowering green Allow.
Narration: the third step merges all groups over the same scope: one Deny is enough to deny; if none is set, there is no permission.
Shot 4 · 80–100s
On screen: the mouse clicks the Why? link beside a permission, and “Deny inherited from Contractors” pops up.
Narration: when something goes wrong, don't guess; click Why, and it tells you which group and which level determined the result.
or score ≥ 70% on the quiz

Module 3 · Access levels, licensing and billing

14:00 – 20:00 · Access levels decide “which features can be used”, permissions decide “what can be done to which objects”; the money goes to Basic users, parallel jobs and Artifacts storage
6 minFirst 5 Basic users freePrices follow the official page (2026-11)★★★★☆
Learning objectives
  • Explain what Stakeholder, Basic, Basic + Test Plans, and the Visual Studio subscription and GitHub Enterprise access levels each allow.
  • Estimate a team's monthly cost: user licenses + Microsoft-hosted / self-hosted parallel jobs + Artifacts storage, and know how the free allowances are enabled.
  • use Entra group rules to assign access levels and project memberships in bulk, and understand “take the highest level” and when re-evaluation happens.
Prerequisites: The three control planes from Module 2. Importance:★★★★☆ (directly tied to budget and to “why can't I see Repos”)

What: access levels

Access levelPrice (2026-11, USD)What it can do (private projects)What it cannot do
StakeholderFree, unlimited usersSome Boards features: view/add/edit work items, drag state, add at the bottom of backlogs, save “My Queries”; full access to Pipelines; Artifacts; view dashboards and the project Wiki; approve releasesNo Repos; cannot reorder backlog priority, cannot assign sprints in the planning pane, cannot view or create query charts; cannot edit the Wiki; no Test Plans
BasicFirst 5 users free, then $6/user/monthAll Boards, Repos, Pipelines and Artifacts features; in Test Plans, only running tests and viewing resultsCreating and managing test plans/suites
Basic + Test Plans$52/user/month (30-day trial available)All of Basic + all Azure Test Plans features—
Visual Studio subscriptionIncluded with the subscription,does not use up the 5 free slotsVS Professional ≈ Basic; VS Enterprise ≈ Basic + Test PlansMust be assigned in the VS subscription management portal; cannot be assigned with group rules
GitHub EnterpriseIncluded with a GitHub Enterprise licenseEquivalent to Basic; recognized when the user signs in, effective within 24 hours at mostIf Test Plans is needed, add Basic + Test Plans separately

What: billing for Pipelines and Artifacts

ItemFree allowancePaid
Microsoft-hosted parallel jobs1 parallel job for private projects, up to 1 hour per run, 1,800 minutes per month (30 hours); enabled automatically only after billing is set up for the organization (Azure subscription linked)$40/month per parallel job, unlimited minutes, up to 31 hours for a single job
Self-hosted parallel jobs1, plus 1 for each active VS Enterprise subscriber; granted automatically, unlimited duration$15/month each; any number of agents can be registered, charged by the number of jobs running at the same time
Azure Artifacts2 GiB per organizationTiers: 2–10 GiB $2/GiB, 10–100 GiB $1/GiB, 100–1,000 GiB $0.5/GiB, above 1,000 GiB $0.25/GiB

Key details: buying the first hosted parallel job from the free tier still leaves parallelism at 1 (it only removes the time limit); to run two jobs at once you must buy two. New organizations are capped at 25 hosted parallel jobs; raising the cap requires contacting support. Parallel jobs are shared across all projects in the organization and cannot be assigned to a specific project. Runs waiting for approval do not use a parallel job. Pipelines are not charged per user, and Stakeholders can also write and run pipelines.

Why: why access levels and permissions are distinct

An access level is a “license”, tied to money and assigned at the organization level; a permission is an “authorization”, tied to objects and assigned at the organization, project or object level. Setting product managers, approvers and business stakeholders as Stakeholders saves a lot of license cost, but you must be clear about their limits on Boards (for example, they cannot drag backlog items to reorder), or they will be mistaken for a permission bug.

How: the billing mechanism

  • All charges go through the Azure subscription linked to the organization and appear on the monthly Azure bill (EA, pay-as-you-go, CSP and so on are all supported); set it up under Organization settings → Billing. No other Azure services need to be used.
  • User licenses are prorated daily. After changing a user from Basic to Stakeholder or removing them, billing stops from the next day.
  • A user takes up only one license per organization; across multiple organizations each is billed separately (except for the “multi-organization billing” option when they share one billing subscription; follow the Billing page).

How: Entra group rules

  • Organization settings → Users → Group rules: assign an access level to an Entra group (or an Azure DevOps group), and also specify which group to join in which projects and which extensions to install. Only PCAs can see and manage this.
  • When a user belongs to multiple rules, the highest access level applies (one rule gives Stakeholder, another gives Basic → Basic). A user who was directly assigned a higher level is not downgraded by group rules.
  • Re-evaluation: triggered manually, when a rule is changed, and automatically every 24 hours; Azure DevOps syncs Entra group membership every hour, but Entra dynamic groups themselves may take 24 hours to update.
  • A user appears under All users and starts consuming a license only after first sign-in; when a user leaves the Entra group and there is no other source, they are automatically removed from the organization.
  • Group rules do not apply to service principals and managed identities; these must be assigned an access level directly.

When: selection guidance

RoleSuggested access level
Developers, operators, and anyone who reads and writes codeBasic (or included with VS / GitHub Enterprise)
Product managers, business stakeholders, approvers, managers who only track progressStakeholder (upgrade to Basic if they need to reorder the backlog or create shared queries)
QA who write and manage manual test plansBasic + Test Plans or VS Enterprise
Service principals / managed identities used by pipelinesAssigned directly (usually Basic; Stakeholder can be considered when only calling the Boards API)
Common misconceptions① “The first 5 free means 5 per project” — it means 5 Basic users per organization. ② “Stakeholders cannot use pipelines” — in a private project Stakeholders have full access to Pipelines; they just have no Repos. ③ “Buying one hosted parallel job lets you run 2 at once” — the first purchase only removes the time limit of the free tier. ④ “A new organization automatically has the free hosted-agent allowance” — the free allowance is enabled only after billing is set up (Azure subscription linked); otherwise you can only use self-hosted agents (Lesson 2 covers the alternatives).

Structure diagram: where licenses come from

Direct assignmentOrganization settings → Users / az devops user Group rules (Entra groups)Highest wins across multiple rules; re-evaluated every 24h Visual Studio subscriptionHighest priority; does not use up a free slot GitHub Enterprise= Basic; recognized within 24 hours of sign-in The user's effective access levelThe highest of all sources(VS Pro and B+TP → B+TP) Monthly bill (Azure subscription) Basic: (N − 5 − VS/GHE users) × $6 Basic + Test Plans: M × $52 Stakeholder: $0 Hosted parallel jobs: P × $40 Self-hosted parallel jobs: S × $15 Artifacts: tiered above 2 GiB Prorated by day, totalled at month end
Figure 3-1: the access level can come from four sources and the highest one applies; all charges appear together on the Azure bill

Flow diagram: group rule lifecycle

Joins Entranew member of sg-dev Sync (≈ 1 hour)dynamic groups may take 24h First sign-inAppears under All users Apply ruleAccess level + project group Leaves Entra groupRe-evaluate / removal
Figure 3-2: group rules automate joiners and leavers: HR changes the Entra group, and Azure DevOps follows

Interactive: monthly cost calculator (based on the official billing rules)

Adjust the number of users and parallel jobs; the calculator applies “first 5 Basic free, VS/GHE users don't use a slot, Stakeholders free, parallel job unit prices, Artifacts tiers”. The log below explains where each item comes from.

$0

Step-by-step animation: how group rules work out a user's access level

Ready.

Command table

CommandPurposeKey parameters
az devops user listList users and access levels--top,--skip
az devops user addAdd a user and assign an access level--email-id,--license-type (express=Basic, stakeholder, advanced=Basic + Test Plans),--send-email-invite
az devops user updateChange access level--user,--license-type
az devops user removeRemove a user from the organization (billing stops immediately)--user,--yes
az devops invoke --area MemberEntitlementManagement --resource GroupEntitlementsQuery group rules (not wrapped by the CLI)--api-version 7.1-preview.1
az devops user list --top 100 \
  --query "items[].{user:user.principalName, level:accessLevel.licenseDisplayName, source:accessLevel.assignmentSource, lastAccess:lastAccessedDate}" -o table
User                 Level         Source    LastAccess
-------------------  ------------  --------  ----------------------------
you@contoso.com      Basic         unknown   2026-11-15T08:40:11.2+00:00
alice@contoso.com    Basic         unknown   2026-11-15T09:02:37.9+00:00
pm@contoso.com       Stakeholder   unknown   0001-01-01T00:00:00+00:00

lastAccessedDate 0001-01-01 means never signed in. assignmentSource The values of this field and the display of group-rule sources follow what is actually returned.

# Find Basic users who have not signed in for 60 days; candidates to downgrade to Stakeholder (Linux/macOS date syntax)
CUTOFF=$(date -u -d '60 days ago' +%Y-%m-%dT%H:%M:%S 2>/dev/null || date -u -v-60d +%Y-%m-%dT%H:%M:%S)
az devops user list --top 1000 \
  --query "items[?accessLevel.licenseDisplayName=='Basic' && lastAccessedDate<'$CUTOFF'].user.principalName" -o tsv

# Downgrade and upgrade
az devops user update --user pm@contoso.com --license-type stakeholder
az devops user update --user qa@contoso.com --license-type advanced

# Query group rules (REST, passed through by the CLI)
az devops invoke --area MemberEntitlementManagement --resource GroupEntitlements \
  --api-version 7.1-preview.1 --query "value[].{group:group.displayName, level:licenseRule.accountLicenseType}" -o table

How to verify: In Organization settings → Users, check the “Access level” column and the “License source”. Common errors: If billing is not set up, the 6th user cannot be assigned Basic and you will see insufficient licenses (see Troubleshooting). Production use: Run a monthly “idle Basic users” report and downgrade automatically; this commonly saves 10%–30% of license costs.

Tip--license-type Historical names are used: express = Basic,advanced = Basic + Test Plans. The web UI and REST licenseDisplayName display the new names.

Goal: Add a Stakeholder and observe its functional limits; (optional) create a group rule. Cost: None. Permissions: PCA (the organization creator is one).

Add a Stakeholder user and put them in Contributors:
az devops user add --email-id pm@contoso.com --license-type stakeholder --send-email-invite false
az devops security group membership add --group-id "$CONTRIB" --member-id pm@contoso.com
Sign in as the pm account and observe: no Repos in the left menu; in Boards → Backlogs you can add work items but cannot drag them to reorder; Queries can be saved to “My Queries” but not to “Shared Queries”. Pipelines can be opened and run.
Upgrade to Basic and observe again:
az devops user update --user pm@contoso.com --license-type express

Have pm refresh the page (sign in again if needed); Repos appears.

(Optional, requires an Entra connection) Create a group rule: Organization settings → Users → Group rules → Add a group rule, select the Entra group sg-myapp-dev, access level Basic, project myapp-lab → Contributors. Trigger “Re-evaluate rules” and check the license source in the user summary.
Check the billing page: Organization settings → Billing, check whether an Azure subscription is linked; under Pipelines → Parallel jobs, check the free allowance status for Microsoft-hosted jobs.
Cleanup:
az devops user remove --user pm@contoso.com --yes

Case 1: license optimization for a 500-person organization

Problem: 500 Basic users, about $2,970 per month ((500−5)×6). Approach: Export the user list and find that 120 people have not signed in for 90 days and 80 are business stakeholders who only look at boards; the former are deleted or downgraded, the latter set to Stakeholder; 120 VS Enterprise subscribers are confirmed to be assigned through the VS portal (they do not use Basic). Result: Basic reduced to about 180 users, monthly cost about $1,050. Limits: Before downgrading, confirm these people do not need Repos or backlog ordering.

Case 2: usable on the first day of employment

Problem: New hires need a ticket for an administrator to add licenses and project memberships, averaging 2 days. Approach: Create Entra groups by department; group rule “sg-eng → Basic + myapp-lab Contributors”; the HR system just writes to the Entra group. Limits: A user consumes a license only after first sign-in; dynamic group updates may be delayed by 24 hours, so on the first day you can re-evaluate manually.

Case 3: pipeline queueing

Problem: 20 developers share 1 hosted parallel job, and PR validation often queues for 30 minutes. Approach: Check the Pool consumption report in the agent pool's Analytics to confirm it is consistently at full load; following the rule of thumb of “1 parallel job per 4–5 users”, buy 4 hosted jobs ($160/month), or move the heavy work to 2 self-hosted agents + 2 self-hosted parallel jobs ($30/month + VM costs).

Common errors and fixes

User reports “the Repos menu is gone” / You don't have access to Azure Repos

Cause: The access level is Stakeholder (private projects have no Repos), or the GitHub Enterprise / group rule license has lapsed and fallen back to the default access level.

az devops user show --user user@contoso.com --query "accessLevel.{level:licenseDisplayName, source:assignmentSource, status:status}"

Fix: Upgrade to Basic, or fix the group rule / GitHub license source.

Cannot assign Basic: the free Basic allowance is used up and billing is not set up for the organization

Cause: The 5 free Basic users are all taken, and without a linked Azure subscription no more can be bought.

Fix: Organization settings → Billing → Set up billing, then select a subscription; or downgrade people who do not write code to Stakeholder to free up slots.

##[error]No hosted parallelism has been purchased or granted.

Cause: The organization has no Microsoft-hosted parallel jobs (the free allowance is not enabled).

Fix: Set up billing for the organization to enable the free allowance automatically (1 job for private projects, 1,800 minutes per month), or switch to self-hosted agents (pool: name: Default, Lesson 2).

The group rule has been created, but the user's access level has not changed

Cause: The user has not yet signed in for the first time; the rule has not been re-evaluated; the user already has a higher direct assignment; the object is a service principal (group rules do not apply).

Fix: Group rules → Re-evaluate rules; check the license source in the user summary; assign service principals directly.

Command-line questions
1. List the emails of all Stakeholder users in the organization.
az devops user list --top 1000 --query "items[?accessLevel.licenseDisplayName=='Stakeholder'].user.principalName" -o tsv
2. Change qa@contoso.com to Basic + Test Plans.
az devops user update --user qa@contoso.com --license-type advanced
Scenario analysis question
Team of 12: 8 developers (3 of whom have VS Enterprise), 2 QA who write test plans, 2 product managers who only track progress and create work items. Needs 2 hosted parallel jobs and 6 GiB of Artifacts. Estimate the monthly cost.

Developers: 5 need Basic (3 come through VS Enterprise), covered by the 5 free slots → $0. QA: 2 × $52 = $104. Product managers: Stakeholder $0. Hosted parallel jobs: the free tier has 1 with a time limit; 2 unlimited concurrent jobs require buying 2 → $80. Artifacts: (6 − 2) × $2 = $8. Total about $192/month (an Azure subscription must also be linked).

Verified teaching videos

No recent video specifically covering Azure DevOps licensing and billing that can be verified via YouTube oEmbed was found. Prices change often; follow the official pricing page. The comprehensive video below includes a tour of organization settings and can be used for reference:

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
English · recorded in 2023; the price information may be out of date

Official documentation

Storyboard script (about 80 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–20s
On screen: three cards: Stakeholder (free), Basic (six dollars), Basic plus Test Plans (fifty-two dollars).
Narration: access level is the license. The first five Basic users are free, and Stakeholders are free with no user limit.
Shot 2 · 20–45s
On screen: one lane in a swimming pool; queued jobs enter the water one after another; adding a lane shortens the queue.
Narration: parallel jobs are like lanes; they determine how many pipeline jobs can run at the same time, regardless of the number of users.
Shot 3 · 45–65s
On screen: two Entra groups point to Stakeholder and Basic; the user finally shows Basic.
Narration: group rules take the highest level; joiners and leavers only require changing the Entra group.
Shot 4 · 65–80s
On screen: an Azure DevOps entry appears on the Azure bill.
Narration: all charges are billed through the linked Azure subscription and prorated by day.
or score ≥ 70% on the quiz

Module 4 · Azure Boards: work items, backlogs and sprints

20:00 – 28:00 · The process determines work item types and states; area paths determine “whose”, iteration paths determine “when”; board columns are just a view of states
8 minInherited processSystem processes cannot be modified directly★★★★☆
Learning objectives
  • Compare the work item types, backlog levels and states of the four system processes (Basic / Agile / Scrum / CMMI), and choose one for a team.
  • Use an inherited process to add fields, states, rules and custom work item types safely.
  • Configure area paths, iteration paths and team settings, and use product backlogs, sprint backlogs, task boards, boards and queries (WIQL).
Prerequisites: The team concept from Module 1; basic Scrum/Kanban concepts. Importance:★★★★☆

What: the four system processes

ProcessRequirement level (backlog)Other typesRequirement state flowBest for
BasicEpic → Issue → Task—To Do → Doing → DoneSmall teams, just starting out, who only want a simple board
AgileEpic → Feature → User Story → TaskBug, IssueNew → Active → Resolved → Closed (also Removed)Most agile teams; this lesson uses it
ScrumEpic → Feature → Product Backlog Item → TaskBug, ImpedimentNew → Approved → Committed → Done (also Removed)Strict Scrum, commitments per sprint
CMMIEpic → Feature → Requirement → TaskBug, Change Request, Issue, Review, RiskProposed → Active → Resolved → ClosedOrganizations that need formal change control and audit traceability

Each process also includes test-related types (Test Plan, Test Suite, Test Case, Shared Steps, etc., used by Test Plans). States are grouped into state categories (Proposed, In Progress, Resolved, Completed, Removed). Boards, burndown and velocity charts are all computed by category, so choose the correct category when customizing states.

Why: why use an inherited process

The four system processes are locked and cannot be modified directly. To add fields, change layouts or add states, first create an inherited process (for example Agile-myapp inherit from Agile), then switch the project to it. Benefits: when the system process is updated, the inherited process automatically gets the updates, and all projects using it stay consistent. What you can do: add custom fields, pick lists, rules (conditionally required, read-only, default values), custom states (inherited states cannot be renamed or deleted), custom work item types, add a composite backlog level, and modify form layouts.

How: key objects

ObjectRoleBelongs to
Area PathGroups work items by product / component / team; also carries permissions (View/Edit work items in this node)Project; teams select the areas they “own” (may include sub-areas)
Iteration PathSprint / release, with start and end datesDefined by the project; teams choose which iterations to take part in, and set the default iteration and backlog iteration
Product backlogRequirement-level work items within a team's area, ordered by priority (Stack Rank / Backlog Priority field)Team
Sprint backlog and task boardRequirements and tasks whose iteration path equals a sprint; capacity planningTeam + iteration
BoardCard view of requirements; columns map to states, can be split into Doing/Done, with WIP limits, swimlanes and card stylesTeam × backlog level
QueryFilters work items with WIQL; can be saved as “My Queries” or “Shared Queries”, used for charts, and added to dashboardsProject (the shared query folder has permissions)
Delivery PlansWork items from multiple teams placed on a calendar timelineProject

When: selection and design advice

  • If unsure, choose Agile; choose Scrum for “commitment” semantics; Basic is the simplest, but switching to Agile/Scrum later requires migrating types.
  • Design area paths around a “long-term stable product structure”, not around people's names; when teams are reorganized, change the team's area selection rather than the paths.
  • Sprint length is fixed (for example two weeks); create 3–6 iterations in advance; sprint dates must not overlap.
  • Note: area and iteration paths can now be deleted only when no work items use them (the same behavior change described in the Azure DevOps Server 25H2 notes).

Comparison with similar tools

Azure BoardsGitHub Issues + ProjectsJira
HierarchyA fixed hierarchy defined by the process + one optional composite levelSub-issues + issue typesEpic / Story / Sub-task, configurable
Process customizationInherited process, shared at organization levelCustom fields, issue typesWorkflow schemes, very flexible
Code integrationNative to Azure Repos; GitHub uses AB#NativePlugins
Common misconceptions① “Dragging a board card and changing its state are two different things” — board columns map to states, so dragging is changing System.State (the Doing/Done split columns are the exception, using a board-specific field). ② “A team equals an area” — a team selects areas, and several teams can share the same area. ③ “Removed means deleted” — Removed is only a state; the work item still exists; real deletion goes to the recycle bin, and permanent deletion needs extra permissions. ④ “Add custom fields directly to the Agile process” — system processes cannot be changed; you must create an inherited process first.

Structure diagram: processes, projects, teams and work items

Organization level: processes Agile (system, locked) Agile-myapp (inherited)+ field Custom.Component · + state Review Project myapp-lab Areas: myapp-lab · myapp-lab\web · myapp-lab\api Iterations: myapp-lab\Sprint 1 (11-16~11-27) · Sprint 2 · Sprint 3 Shared queries: Shared Queries\Current sprint · Bugs by area Settings of team web Default area: myapp-lab\web (including sub-areas) Iterations: Sprint 1–3; default iteration @CurrentIteration Backlog levels: Epics · Features · Stories Bug behavior: appears on the backlog together with requirements Work item hierarchy (parent-child links) Epic #1 Observability Feature #2 Health checks User Story #3 /healthz Task #4 Write tests
Figure 4-1: the process is defined at organization level and used by projects; teams choose “which work items to see and in which sprint” through areas and iterations

State diagram: mapping of Agile process User Story states to board columns

New Active Resolved Closed Category ProposedIn ProgressResolvedCompleted Column New Column ActiveSplit Doing | Done · WIP 5 Column Resolved Column Closed Removed(not shown)
Figure 4-2: a board column is a view of states; one column can map to several states, but each state can belong to only one column

Interactive animation: what happens when you drag a board card

Click the button below a card to move it to the next column. Each move shows the REST call the browser actually sends (JSON Patch update System.State), the server-side rule checks (for example, Resolved By/Date filled in automatically when Resolved), the change in the revision number rev, and the state category used by the burndown chart.

Click “→” on a card to start.

Command table

CommandPurposeKey parameters
az boards area project create / listCreate / list project area paths--name,--path (parent path),--depth
az boards area team addAdd areas to a team--team,--path '\myapp-lab\web',--set-as-default,--include-sub-areas
az boards iteration project create / listCreate / list iterations--name,--start-date,--finish-date
az boards iteration team add / set-default-iteration / set-backlog-iterationTeam takes part in iterations, set default--team,--id (iteration identifier, GUID)
az boards work-item create / update / show / deleteCreate, read, update and delete work items--type,--title,--area,--iteration,--fields,--state
az boards work-item relation add / showparent-child and other links--relation-type parent|child|related,--target-id
az boards queryRun WIQL or a saved query--wiql,--id,--path
# Areas: myapp-lab\web and myapp-lab\api, and set as the team's default area
az boards area project create --name web
az boards area project create --name api
az boards area team add --team web --path '\myapp-lab\web' --set-as-default --include-sub-areas true

# Iterations: one two-week sprint, with the web team taking part
az boards iteration project create --name "Sprint 1" --start-date 2026-11-16 --finish-date 2026-11-27
az boards iteration project create --name "Sprint 2" --start-date 2026-11-30 --finish-date 2026-12-11
S1=$(az boards iteration project list --depth 1 --query "children[?name=='Sprint 1'].identifier" -o tsv)
S2=$(az boards iteration project list --depth 1 --query "children[?name=='Sprint 2'].identifier" -o tsv)
az boards iteration team add --team web --id $S1
az boards iteration team add --team web --id $S2
az boards iteration team list --team web -o table
Name      Path                     StartDate             FinishDate
--------  -----------------------  --------------------  --------------------
Sprint 1  myapp-lab\Sprint 1       2026-11-16T00:00:00Z  2026-11-27T00:00:00Z
Sprint 2  myapp-lab\Sprint 2       2026-11-30T00:00:00Z  2026-12-11T00:00:00Z
# Work items and parent-child links
EPIC=$(az boards work-item create --type Epic --title "Observability" --area 'myapp-lab\web' --query id -o tsv)
STORY=$(az boards work-item create --type "User Story" --title "Provide /healthz health check" \
  --area 'myapp-lab\web' --iteration 'myapp-lab\Sprint 1' \
  --fields "Microsoft.VSTS.Scheduling.StoryPoints=3" "Microsoft.VSTS.Common.Priority=1" --query id -o tsv)
az boards work-item relation add --id $STORY --relation-type parent --target-id $EPIC
az boards work-item update --id $STORY --state Active --assigned-to you@contoso.com

# WIQL: unfinished stories in the web team's current sprint
az boards query --wiql "SELECT [System.Id],[System.Title],[System.State] FROM WorkItems \
WHERE [System.TeamProject] = @project AND [System.WorkItemType] = 'User Story' \
AND [System.IterationPath] = @CurrentIteration('[myapp-lab]\web Team') \
AND [System.State] <> 'Closed' ORDER BY [Microsoft.VSTS.Common.Priority]" -o table

How to verify: Boards → Sprints → web team → Sprint 1 should show the story; in Backlogs it sits under the Epic (open the Epic level or turn on “Parents: Show”). Common errors: Path written as myapp-lab\Area\web—area paths do not contain “Area”, whereas --path the parent path parameter is only used in project create \myapp-lab\Area; in WIQL <> in the shell it must be enclosed in quotes. Production use: Bulk-import backlog items from CSV or a script; drive dashboards with shared queries.

Goal: Set up areas, two sprints and the Epic → Story → Task hierarchy for the web team, and walk through the states on the board. Cost: None.

Run the three command blocks on the “Commands” page, and record $EPIC,$STORY IDs.
Add a task:
TASK=$(az boards work-item create --type Task --title "Write unit tests for /healthz" --area 'myapp-lab\web' --iteration 'myapp-lab\Sprint 1' \
  --fields "Microsoft.VSTS.Scheduling.RemainingWork=4" --query id -o tsv)
az boards work-item relation add --id $TASK --relation-type parent --target-id $STORY
az boards work-item relation show --id $STORY --query "relations[].{rel:rel, url:url}" -o table
Rel                                  Url
-----------------------------------  -------------------------------------------------------------
System.LinkTypes.Hierarchy-Reverse   https://dev.azure.com/contoso-lab/_apis/wit/workItems/1
System.LinkTypes.Hierarchy-Forward   https://dev.azure.com/contoso-lab/_apis/wit/workItems/4
Configure the board: Boards → Boards → web team → Stories → gear icon → Columns: for Active, turn on “Split column into doing and done” and set a WIP limit of 5; under Swimlanes, add an “Expedite” swimlane.
Create an inherited process (requires PCA): Organization settings → Boards → Process → Agile → “...” → Create inherited process, named Agile-myapp; add a field to User Story Component (pick list: web/api/infra); project myapp-lab → Change process → Agile-myapp.
Verify: open the story form and check that the Component field is visible; drag the story to Resolved on the board, and the revision number rev in the form history increments and Resolved By is filled in automatically.
Cleanup: keep it; the capstone lab and Module 5 will continue to use this story to link PRs.

Case 1: three teams sharing one backlog makes “whose work is it” unclear

Problem: All work items sit in the root area, and the three teams' boards look exactly the same. Approach: Create areas web/api/infra by product component, with each team selecting only its own area; the default team keeps the root area and “includes sub-areas” as an overview. Configuration:az boards area team add --team api --path '\myapp-lab\api' --set-as-default. Limits: Changing area paths updates many work items, so do it during off-peak hours.

Case 2: audit requires every Bug to have a severity and a root cause

Approach: Add a “Root cause” field to Bug in the inherited process; rules: Root cause is required when State changes to Closed, and Severity is required. Limits: Rules are enforced on the server and apply equally to REST/CLI, so automation scripts must fill in the fields, or they will return TF401320 rule validation errors.

Case 3: switching from the Basic process to Agile

Problem: The project started on Basic (Issue) and now needs the Feature/Story hierarchy. Approach: Follow the official “Change a project from Basic to Agile” steps: switch the project to the Agile inherited process, then use bulk edit to change Issue to User Story and map states (To Do→New, Doing→Active, Done→Closed). Limits: Queries and board column settings must be rechecked; rehearse first in a test project.

Common errors and fixes

TF401347: Invalid tree name given for work item -1, field 'System.AreaPath'.

Cause: The area or iteration path does not exist, or the spelling, case or backslashes are wrong (for example, writing myapp-lab/web).

az boards area project list --depth 2 -o json --query "children[].path"

Fix: Create the path first, and use myapp-lab\web format.

A newly created work item does not appear in the team backlog

Cause: The work item's area is outside the areas selected by the team; or its type is not on the backlog level (for example, Task only shows on the sprint task board); or its state belongs to Completed/Removed.

Fix: Check Project settings → Team configuration → Areas; change the work item's area to the team's area; check filters such as “Completed child items” in the upper-right corner of the backlog.

The sprint page shows “No iterations selected for this team”

Cause: Iterations are created only at project level, and the team has not selected them.

az boards iteration team add --team web --id <iteration-guid>
When dragging a card: The field 'Story Points' cannot be empty / Rule validation failed

Cause: The inherited process defines a conditionally required rule.

Fix: Open the card, fill in the field, then move it; or adjust the rule. Rules apply equally to CLI/REST updates.

Command-line questions
1. Move work item 3 to Sprint 2 and set it to Resolved.
az boards work-item update --id 3 --iteration 'myapp-lab\Sprint 2' --state Resolved
2. Use WIQL to list all Bugs in the web area whose state is Active.
az boards query --wiql "SELECT [System.Id],[System.Title] FROM WorkItems WHERE [System.TeamProject]=@project AND [System.WorkItemType]='Bug' AND [System.AreaPath] UNDER 'myapp-lab\web' AND [System.State]='Active'" -o table
Scenario analysis question
The project manager requires that every User Story gets a “Customer” field, required when it enters Active; another project using Agile must be unaffected. How do you implement this?

Create a process inherited from Agile (for example Agile-myapp), add the Customer field to User Story, and add the rule “When State changes to Active → Make required Customer”; switch only myapp-lab to this inherited process, while the other project keeps using Agile (or another inherited process). System processes themselves cannot be modified.

Verified teaching videos

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
English · the first half demonstrates Azure Boards: work items, backlogs, sprints and boards
▶
Azure DevOps Tutorial for Beginners | Azure DevOps | Azure DevOps Boards | Intellipaat — Intellipaat
English · a long introductory course that includes a Boards section; recorded earlier, so follow this lesson for the interface

Official documentation

Storyboard script (about 90 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–25s
On screen: four process cards, Basic, Agile, Scrum and CMMI, each expanding into its work item hierarchy.
Narration: choose the process first. The process determines which work item types and states exist; if unsure, choose Agile.
Shot 2 · 25–50s
On screen: two trees in a project: area paths by component, iteration paths by sprint dates.
Narration: areas answer “whose is this”, iterations answer “when is it done”. Teams select their own part from them.
Shot 3 · 50–75s
On screen: a board card is dragged from New to Active, and a line of PATCH request pops up at the bottom of the screen.
Narration: dragging a card is really changing the state field; the server enforces the process rules and increments the revision number.
Shot 4 · 75–90s
On screen: fields and rules are being added in the inherited-process editor.
Narration: to customize, first create an inherited process; the system process itself is locked.
or score ≥ 70% on the quiz

Module 5 · Azure Repos: repositories, branch policies and PRs

28:00 – 36:00 · Once a required policy is added to a branch, changes can only be made through a PR; whether a PR can be completed is decided by the policy evaluator, one policy at a time
8 minBranch policies GAGit-side details are in Lesson 3 of the Git course★★★★★
Learning objectives
  • List the types of branch policy (minimum reviewers, linked work items, comment resolution, limited merge types, build validation, status checks, automatic reviewers), and understand the difference between “required” and “optional”.
  • Walk through the full PR lifecycle: draft → publish → review votes → policy evaluation → auto-complete → merge type → work item state transition.
  • Understand how branch-level permissions (Force push, Bypass policies) relate to policies, so that policies are not “in name only”.
Prerequisites: Module 2 permissions and Module 4 work items. For Git branching, merging, rebasing and Azure Repos authentication (GCM, SSH supports RSA only, repository 250 GB / 5 GB per push limits), see Lesson 3 of the Git course. Importance:★★★★★

What: repositories and branch policies

A project can have any number of Git repositories (unlimited private repositories) and at most one TFVC repository (legacy; new projects should use Git only; the organization can turn on “Disallow creating TFVC repositories”). Branch policies are attached to a “repository + branch (or branch pattern)”; they can also be set under Project settings → Repositories → Policies as cross-repository policies (applies to the main or release/* of all repositories; pattern matching is case-sensitive).

PolicyPurposeKey options
Require a minimum number of reviewersMinimum number of approvalsWhether the author may vote for their own change; prohibit approval by the most recent pusher; whether it can still be completed if someone has voted “Wait/Reject”; reset votes when new pushes arrive
Check for linked work itemsPR must link a work itemRequired / optional
Check for comment resolutionAll comments must be resolvedRequired / optional
Limit merge typesLimit merge typesBasic merge (no-ff), Squash, Rebase and fast-forward, Rebase with merge commit (semi-linear)
Build validationPR's pre-merge result must build successfullySelect the pipeline, trigger mode (automatic/manual), expiration policy, path filter
Status checksExternal services (security scans, deployment previews) write back statusStatus name, whether required, when it expires
Automatically included reviewersAutomatically add reviewers by path (similar to CODEOWNERS)Required / optional; path filter such as /infra/*

Why: why use policies rather than just “conventions”

As long as any one of these is required is enabled, the branch cannot be pushed to directly; all changes must go through a PR (a push is rejected with TF402455). Policies are enforced on the server and apply equally to the web, CLI, REST and IDE. Combined with the branch permissions from Module 2, for main an explicit Deny on Force push; Bypass policies is not granted to any ordinary group.

How: the internal mechanics of PRs

  1. Creating a PR: source branch → target branch; it can be a draft (Draft; it does not trigger required-review notifications; build validation can be configured).
  2. Pre-merge commit: the server computes a merge result and stores it at refs/pull/{id}/merge; build validation builds exactly this, so a “green PR” means the merged code passes. When the target branch moves forward, the result can be set to “expire” under the policy and must be rebuilt.
  3. Voting: Approve (10), Approve with suggestions (5), No vote (0), Wait for author (−5), Reject (−10).
  4. Policy evaluation: each policy produces an evaluation record (policy evaluation) with the status queued / running / approved / rejected / notApplicable. A PR can be completed only when all required policies are approved.
  5. Completing: choose an allowed merge type; you can tick “Delete source branch after completion” and “Complete linked work items” (moves work items to a completed state such as Resolved/Closed). When Auto-complete is set, the server merges automatically once all policies pass.

Four ways to link work items

  • Select work items when creating a PR (or az repos pr create --work-items).
  • Write #42 in the PR description or a comment; the mention creates a link.
  • Click “Create a branch / pull request” in the Development area of the work item form.
  • Repository settings can turn on “commit mention links” and “commit mention work item resolution” (write Fixes #42 in the commit message, and it is resolved automatically after merging to the default branch); GitHub repositories use AB#42.

When: recommended baseline (main branch)

PolicySmall teamRegulated / production repositories
Minimum reviewers1, self-approval not allowed2, the most recent pusher cannot approve, new pushes reset votes
Linked work itemsRequiredRequired
Comment resolutionRequiredRequired
Merge typesSquash onlySquash or semi-linear
Build validationRequired (added in Lesson 2)Required + security scan status check

Comparison with GitHub

Azure ReposGitHub
Protection mechanismBranch policies + branch permissions + cross-repository policiesRulesets (ruleset) / branch protection rules
Code ownersAutomatic reviewers (path filter)CODEOWNERS file
Work item linkingNative policy enforcementRequires Actions or third-party tools
Signed commitsNo built-in “require signed commits” policyRulesets can require signed commits
Common misconceptions① “Policies only apply in the web UI” — the server enforces them, so every client is treated the same. ② “Project Administrators are not bound by policies” — by default they cannot bypass them; bypassing requires explicitly granting the Bypass policies permission (not recommended as a standing grant). ③ “Build validation builds the source branch” — it builds the pre-merge commit. ④ “Linking a work item closes it automatically” — you need to tick “Complete linked work items” at completion, or use the commit mention resolution setting.

Structure diagram: policies, permissions and PRs

feature/healthzDeveloper push (Contribute) PR !7 → main refs/pull/7/merge (pre-merge commit) ✓ Minimum reviewers 1 (1 Approve so far) ✓ Linked work item #3 ✗ Comment resolution (1 unresolved) … Build validation running (building refs/pull/7/merge) ✓ Merge type: Squash Auto-complete: set, waiting for all required policies to pass mainSquash commit + delete source branch#3 → Resolved Direct git push mainTF402455: a PR must be usedgit push -f: Force push = Deny
Figure 5-1: required policies make main “changeable only through a PR”, and the pre-merge commit ensures validation checks the merged result

Sequence diagram: from PR creation to completion

DeveloperAzure ReposPolicy enginePipelinesBoards POST pullrequests Create evaluation record Queue build refs/pull/7/merge Work item #3 shows the linked PR Reviewer votes / resolves comments Build succeeds → approved All required policies approved Auto-complete: squash merge → complete linked work items Notification + delete source branch
Figure 5-2: auto-complete means developers need not watch the PR; the moment the last policy passes, the server completes the merge

Interactive simulator: PR policy evaluator

The left side shows main's policy configuration, and the right side shows the current state of the PR. Each time you change any item, the evaluator recalculates each policy's result (approved / rejected / running / notApplicable) and judges whether the “Complete” button is available and whether auto-complete would trigger. The log shows the corresponding REST resources.

Command table

CommandPurposeKey parameters
az repos policy approver-count createMinimum reviewers--minimum-approver-count,--creator-vote-counts,--allow-downvotes,--reset-on-source-push
az repos policy work-item-linking createWork item linking requiredCommon parameters
az repos policy comment-required createComment resolution requiredCommon parameters
az repos policy merge-strategy createLimit merge types--allow-squash,--allow-no-fast-forward,--allow-rebase,--allow-rebase-merge
az repos policy required-reviewer createAutomatically include reviewers by path--required-reviewer-ids,--path-filter
az repos policy build createBuild validation (Lesson 2)--build-definition-id,--queue-on-source-update-only,--valid-duration
az repos policy listList policies--repository-id,--branch
az repos pr create / update / show / listPR management--work-items,--auto-complete,--squash,--delete-source-branch,--transition-work-items,--draft
az repos pr set-voteVote--vote approve|approve-with-suggestions|reset|wait-for-author|reject
az repos pr policy listView the PR's policy evaluation--id

Common parameters: --repository-id,--branch,--blocking (true = required),--enabled.

REPO_ID=$(az repos show --repository myapp --query id -o tsv)
COMMON="--repository-id $REPO_ID --branch main --blocking true --enabled true"
az repos policy approver-count create $COMMON --minimum-approver-count 1 \
  --creator-vote-counts false --allow-downvotes false --reset-on-source-push true
az repos policy work-item-linking create $COMMON
az repos policy comment-required create $COMMON
az repos policy merge-strategy create $COMMON --allow-squash true --allow-no-fast-forward false
az repos policy list --repository-id $REPO_ID --branch main \
  --query "[].{id:id, type:type.displayName, blocking:isBlocking}" -o table
Id    Type                                  Blocking
----  ------------------------------------  ----------
1     Minimum number of reviewers           True
2     Work item linking                     True
3     Comment requirements                  True
4     Require a merge strategy              True
# A complete PR: branch → push → create PR (linked work item, auto-complete) → vote → view policies
git switch -c feature/healthz
echo "# healthz returns ok" >> README.md && git commit -am "docs: healthz #$STORY" && git push -u origin feature/healthz
PR=$(az repos pr create --repository myapp --source-branch feature/healthz --target-branch main \
  --title "Add /healthz docs" --description "Implements #$STORY" --work-items $STORY \
  --auto-complete true --squash true --delete-source-branch true --transition-work-items true --query pullRequestId -o tsv)
az repos pr policy list --id $PR --query "[].{policy:configuration.type.displayName, status:status}" -o table
az repos pr set-vote --id $PR --vote approve   # Must be run by a reviewer other than the author (creator-vote-counts=false)
Policy                        Status
----------------------------  --------
Minimum number of reviewers   rejected
Work item linking             approved
Comment requirements          approved
Require a merge strategy      approved

How to verify: After the reviewer approves,az repos pr show --id $PR --query status changes to completed, and the work item is moved to a completed state. Common errors: The author's own approval does not count; the branch name written as refs/heads/main and main are both acceptable, but policy matching is case-sensitive. Production use: Treat policies as code: az repos policy create --config policy.json roll them out to all repositories in bulk.

Goal: Add 4 required policies to myapp's main, verify that a direct push is rejected, and then complete a PR linked to a work item. Environment: A second account is needed as the reviewer (alice, Basic, Contributors). Cost: None.

Create the policies: run the first block on the “Commands” page.
Verify that a direct push is rejected:
git switch main && echo x >> README.md && git commit -am "direct push" && git push
remote: error: TF402455: Pushes to this branch are not permitted; you must use a pull request to update this branch.
 ! [remote rejected] main -> main (TF402455: ...)
git reset --hard HEAD~1   # Undo this local commit
Create the PR: run the second block on the “Commands” page ($STORY from Module 4).
Approve with alice: alice signs in to the web and approves, or runs az repos pr set-vote --id $PR --vote approve in alice's CLI session.
Verify: the PR auto-completes; az boards work-item show --id $STORY --query fields.\"System.State\" shows Resolved (or the completed state defined by the process); the source branch is deleted.
Cleanup: keep the policies (the capstone lab reuses them); locally git switch main && git pull.

Case 1: protect main across 200 repositories in one go

Problem: Configuring each repository one by one is impractical, and new repositories are often forgotten. Approach: Add cross-repository branch policies under Project settings → Repositories → Policies, applying to the default branch of all repositories; repositories that need exceptions get stricter repository-level policies. Limits: Branch patterns in cross-repository policies are case-sensitive,Main and main are different.

Case 2: infrastructure code must be reviewed by the platform team

Approach: Automatic reviewers policy: path /infra/*;/pipelines/* → required reviewer “[myapp-lab]\Platform”. Effect: When these paths change, the platform team is added automatically and must approve; other paths do not bother them.

Case 3: emergency fix bypasses policies

Problem: An outage in the early morning, with reviewers offline. Approach: Create a “Hotfix Approvers” group, and only this group is allowed “Bypass policies when completing pull requests” on main; the bypass reason must be entered on completion and is recorded in the audit log; review is completed the next day. Limits: Do not give Project Administrators standing bypass permission.

Common errors and fixes

TF402455: Pushes to this branch are not permitted; you must use a pull request to update this branch.

Cause: The branch has a required policy. This is expected behavior.

Fix: Push to a new branch and create a PR; an automation account that genuinely needs to push directly can be granted “Bypass policies when pushing” (use with care).

PR shows “1 of 1 reviewers must approve”, and the author has already approved but it still does not pass

Cause: The policy is set not to count the author's vote (creator-vote-counts=false), or “the most recent pusher cannot approve” is set.

Fix: Ask someone else to review; check az repos pr policy list --id PR.

Work item linking: Required — cannot complete the PR

Cause: The PR is not linked to a work item.

az repos pr work-item add --id $PR --work-items 3
TF401027: You need the Git 'PullRequestContribute' permission to perform this action.

Cause: Commenting, voting or creating a PR requires the “Contribute to pull requests” permission; Readers have it by default, but a group may deny it on the repository.

Fix: Use Why? to find the source of the deny, as in the Module 2 method.

Message when merging: The merge type is not allowed by policy / only Squash can be selected

Cause: The Limit merge types policy allows only some methods.

Fix: Select an allowed method; with the CLI, use --squash true.

Command-line questions
1. Add a required policy to myapp's release/* branches: “at least 2 reviewers, new pushes reset votes” (hint: the branch pattern needs --branch-match-type prefix).
az repos policy approver-count create --repository-id $REPO_ID --branch release --branch-match-type prefix \
  --blocking true --enabled true --minimum-approver-count 2 --creator-vote-counts false --allow-downvotes false --reset-on-source-push true
2. List the number, title and author of all active PRs in myapp.
az repos pr list --repository myapp --status active --query "[].{id:pullRequestId, title:title, by:createdBy.displayName}" -o table
Scenario analysis question
main has “minimum 1 reviewer (required)” enabled, but someone can still directly git push --force overwrite main. What could be the cause? How do you close it off completely?

Possible cause: the user, or a group they belong to, was granted the “Bypass policies when pushing” and “Force push” permissions (for example, they were added to a highly privileged custom group, or the permissions were granted to an automation account). Fix: check the Why? for these permissions in main's Security settings, remove unnecessary Allow entries, explicitly Deny Force push for Contributors and Project Administrators; grant Bypass only to one controlled emergency group, with auditing.

Verified teaching videos

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
English · mid-section demonstrates Azure Repos: repositories, branches and PRs
▶
Azure DevOps Tutorial for Beginners | CI/CD with Azure Pipelines — TechWorld with Nana
English · includes an Azure Repos section

Official documentation

Storyboard script (about 90 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–20s
On screen: in the terminal, git push main is rejected with red text showing TF402455.
Narration: once a required policy is added to main, no one can push directly; changes must go through a pull request.
Shot 2 · 20–50s
On screen: the policy list on the right side of the PR page turns from grey to green one by one.
Narration: each policy produces an evaluation record: reviewer count, linked work items, comment resolution, merge type, build validation.
Shot 3 · 50–75s
On screen: a virtual merge commit node refs/pull/7/merge, surrounded by pipeline icons.
Narration: build validation builds the pre-merge commit, so green means the merged code is fine.
Shot 4 · 75–90s
On screen: the last policy turns green, the PR auto-completes, and the work item card slides into the Resolved column.
Narration: with auto-complete set, the server merges automatically when the last policy passes, and updates the linked work items.
or score ≥ 70% on the quiz

Module 6 · az devops CLI and REST API

36:00 – 43:00 · Anything the CLI can do can be done via REST; for operations the CLI does not wrap, use az devops invoke; prefer Microsoft Entra tokens for authentication, with PATs only as a fallback
7 minazure-devops extension 1.0.11Global PATs being retired★★★★★
Learning objectives
  • Compare three authentication methods (Microsoft Entra tokens, PATs, service principals / managed identities), and know the purpose of the Azure DevOps resource ID 499b84ac-1321-427f-aa17-267ca6975798 .
  • Be proficient with az devops,az boards,az repos,az pipelines four command groups, and --query / -o tsv.
  • Read the REST URL structure and api-version rules (GA,-preview, resource version number), and handle paging, throttling and common error codes.
Prerequisites: Objects from Modules 2–5; HTTP and JSON. Importance:★★★★★ (the foundation of all automation)

What: three authentication methods

MethodHow to obtain itRequest headerLifetimeBest for
Microsoft Entra token (user)az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798; or interactive sign-in with MSALAuthorization: Bearer <JWT>About 1 hour; re-obtained when expiredTemporary scripts and administrator operations; protected by MFA and conditional access
Service principal / managed identityaz login --service-principal or az login --identity then obtain tokens the same way; the identity must first be added to the organization and assigned an access levelBearerAbout 1 hourBackground services, pipelines, automation tools (no long-term secret to store)
Personal access token (PAT)User settings → Personal access tokens; choose the organization and scopeAuthorization: Basic base64(":"+PAT) (username empty)Your choice, up to 1 yearLegacy tools and scenarios where Entra cannot be used
Current status of PATs (verified 2026-11) Official guidance is to prefer Entra tokens, managed identities or service principals, and to use PATs only at organization level (for a single organization), with minimal scope and the shortest practical lifetime. Global PATs (All accessible organizations) are being retired, but the official retirement dates are inconsistent: the sprint 270 release notes and the best-practices section of the PAT documentation say 2026-12-01, while the top of the PAT documentation says 2027-01-27—follow the latest release notes, and migrate now. Administrators can restrict PAT creation, restrict global PATs and limit maximum lifetime through organization / tenant policies. Old Azure DevOps OAuth apps no longer accept new registrations (since 2025-04); new apps use Microsoft Entra ID OAuth.

Why: why use the CLI and REST

The web UI suits exploration, but automation must be repeatable: new project setup, bulk policies, license audits, migration scripts, chatbots and internal portals all depend on REST. az devops The extension wraps REST with a default organization/project, automatic detection of the Git remote (--detect) and JMESPath queries; for operations not wrapped, use az devops invoke as a pass-through, which still gets the same authentication.

How: the components of a REST request

VERB https://dev.azure.com/{organization}[/{project}[/{team}]]/_apis[/{area}]/{resource}?api-version={version}

Example:
GET  https://dev.azure.com/contoso-lab/_apis/projects?api-version=7.1
POST https://dev.azure.com/contoso-lab/myapp-lab/_apis/wit/wiql?api-version=7.1
GET  https://dev.azure.com/contoso-lab/myapp-lab/_apis/git/repositories/myapp/pullrequests?searchCriteria.status=active&api-version=7.1
Some services use separate hosts: vssps.dev.azure.com (users, groups, graph API), vsaex.dev.azure.com (user entitlements / licensing), feeds.dev.azure.com (Artifacts)
api-version formatMeaning
7.1GA (Azure DevOps Server 2022.1 corresponds to 7.1; the cloud service is compatible with the latest and older versions)
7.2-preview / 7.2-preview.1Preview version; must include -preview; the trailing number is the resource version
OmittedNot recommended: behavior may change as the service is upgraded. The official requirement is that every request includes api-version
  • Paging: most list APIs support $top/$skip; some return a response header x-ms-continuationtoken, and the next request includes continuationToken. WIQL returns only IDs, which are then fetched with workitems?ids= in batches (up to 200 per batch).
  • Throttling: calculated by the resources consumed per identity (TSTU); when delayed, the response carries headers X-RateLimit-Resource,X-RateLimit-Remaining and Retry-After, and clients should respect Retry-After.
  • Updating work items uses JSON Patch: Content-Type: application/json-patch+json, with the body [{"op":"add","path":"/fields/System.Title","value":"..."}].

When: which to choose

  • Interactive administrative work: az login + az devops (the underlying layer uses Entra tokens automatically).
  • Calling Azure DevOps from inside a pipeline: prefer $(System.AccessToken) (job access token, Lesson 2) or an Azure DevOps service connection with workload identity federation.
  • Long-running external services: service principals / managed identities.
  • Legacy tools that can only use PATs: organization-level, minimal scope, short-lived, stored in a key vault and rotated regularly.

Comparison with GitHub

Azure DevOpsGitHub
CLIaz devops/boards/repos/pipelines (Azure CLI extension)gh
APIREST (versioned via api-version)REST (X-GitHub-Api-Version) + GraphQL
TokensEntra tokens, PATs (organization level)Fine-grained PATs, GitHub App installation tokens
Common misconceptions① “Putting the PAT in the URL is more convenient” — URLs end up in logs and history; the PAT should go only in a request header or a credential manager. ② “Basic authentication requires a username” — the username can be any value or empty; what matters is the PAT after the colon. ③ “az devops must run az devops login” — after az login signing in, az devops the commands use the Entra token directly, and az devops login is only used for PATs. ④ “Writing 7.2 is enough for preview APIs” — you must write 7.2-preview, otherwise an error is returned.

Architecture diagram: CLI, REST and authentication

az devops / boardsrepos / pipelinesDefaults: az devops configurePass-through: az devops invoke curl / PowerShell / SDKazure-devops-python-api.NET client library, Node API Microsoft Entra IDResource 499b84ac-1321-427f-aa17-267ca6975798MFA · conditional access · 1-hour token PAT (organization level)scope: Work Items (Read) …Up to 1 year · can be restricted by policyGlobal PATs being retired dev.azure.com/{org}/_apis ① Authentication: Bearer JWT or Basic PAT ② Organization / tenant policies (PAT restrictions, CA) ③ api-version negotiation ④ Access level + security namespace authorization ⑤ Throttling (TSTU) → Retry-After ⑥ JSON response + continuation token
Figure 6-1: whether via CLI or curl, the end result is a REST request with a token; Entra tokens are protected by MFA and conditional access, while PATs are not subject to them

Data flow diagram: the two-step WIQL query

POST …/_apis/wit/wiql{"query":"SELECT [System.Id] …"}api-version=7.1 returns workItems[]only id and url(up to 20,000 items) GET …/_apis/wit/workitems?ids=1,3,4&fields=System.Title,…up to 200 IDs per batch
Figure 6-2: WIQL returns only IDs (result limit 20,000), and the fields must be fetched in a second bulk call

Step-by-step animation: the full path of one REST request

Choose an authentication method and a fault to inject, then play step by step. Each step shows a real fragment of the request or response (request headers, status codes, error messages).

Ready.

Command table

CommandPurposeKey parameters
az devops configureSet / view the default organization and project--defaults,--list
az devops login / logoutsave / delete a PAT (PAT scenarios only)--organization; or environment variable AZURE_DEVOPS_EXT_PAT
az account get-access-tokenObtain an Entra token--resource 499b84ac-1321-427f-aa17-267ca6975798
az devops invokeCall any REST resource--area,--resource,--route-parameters,--query-parameters,--http-method,--in-file,--api-version
az boards ...Work items, areas, iterations, queriessee Module 4
az repos ...Repositories, policies, PRs, imports, refssee Module 5
az pipelines list / run / runs listPipelines (detailed in Lesson 2)--name,--branch,--parameters

Method A: Entra token + curl

ORG=contoso-lab
TOKEN=$(az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv)
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://dev.azure.com/$ORG/_apis/projects?api-version=7.1" | jq -r '.value[] | "\(.name)\t\(.visibility)"'
myapp-lab	private

Method B: PAT + curl (only when Entra cannot be used)

read -rs AZURE_DEVOPS_EXT_PAT && export AZURE_DEVOPS_EXT_PAT     # Enter interactively; keeps it out of shell history
curl -s -u ":$AZURE_DEVOPS_EXT_PAT" "https://dev.azure.com/$ORG/_apis/connectionData?api-version=7.1-preview" \
  | jq '{user: .authenticatedUser.providerDisplayName, id: .authenticatedUser.id}'

WIQL + bulk field retrieval

cat > wiql.json <<'EOF'
{ "query": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = 'myapp-lab' AND [System.State] <> 'Closed' ORDER BY [System.ChangedDate] DESC" }
EOF
IDS=$(curl -s -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @wiql.json \
  "https://dev.azure.com/$ORG/myapp-lab/_apis/wit/wiql?api-version=7.1&\$top=200" | jq -r '[.workItems[].id] | join(",")')
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://dev.azure.com/$ORG/myapp-lab/_apis/wit/workitems?ids=$IDS&fields=System.Id,System.WorkItemType,System.Title,System.State&api-version=7.1" \
  | jq -r '.value[] | [.id, .fields."System.WorkItemType", .fields."System.State", .fields."System.Title"] | @tsv'
4	Task	New	Write unit tests for /healthz
3	User Story	Resolved	Provide /healthz health check
1	Epic	New	Observability

The same thing with az devops invoke (authentication applied automatically)

az devops invoke --area wit --resource wiql --route-parameters project=myapp-lab \
  --http-method POST --in-file wiql.json --api-version 7.1 --query "workItems[].id" -o tsv

# Create a work item (JSON Patch)
cat > patch.json <<'EOF'
[ {"op":"add","path":"/fields/System.Title","value":"Task created through REST"},
  {"op":"add","path":"/fields/System.AreaPath","value":"myapp-lab\\web"} ]
EOF
curl -s -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json-patch+json" -d @patch.json \
  "https://dev.azure.com/$ORG/myapp-lab/_apis/wit/workitems/\$Task?api-version=7.1" | jq '{id, rev, state: .fields."System.State"}'

How to verify: A new task appears on Boards, and “Changed By” in History is the identity tied to the token. Common errors: In the shell, $Task gets expanded and must be escaped as \$Task or URL-encoded %24Task; if Content-Type is written as application/json, the response is 415. Production use: Wrap common REST calls into scripts or use the official SDK; for 429/503, respect Retry-After.

Goal: Complete the same set of queries via both the CLI and REST paths, and experience the difference between a PAT and an Entra token. Cost: None. Security: Give the PAT only the Work Items (Read) scope, with a 1-day lifetime, and revoke it immediately after the lab.

Entra token: run Method A from the “Commands” page, and decode the token to see its audience (for learning only; do not parse tokens in production):
echo "$TOKEN" | cut -d. -f2 | tr '_-' '/+' | base64 -d 2>/dev/null | jq '{aud, upn, exp}'
{ "aud": "499b84ac-1321-427f-aa17-267ca6975798", "upn": "you@contoso.com", "exp": 1794729600 }
Create a read-only PAT: User settings → Personal access tokens → New Token: choose contoso-lab for Organization (do not choose All accessible organizations), Expiration 1 day, Scopes: Work Items → Read.
Verify the scope boundary: reading work items with the PAT succeeds, writing work items fails:
curl -s -o /dev/null -w "%{http_code}\n" -u ":$AZURE_DEVOPS_EXT_PAT" "https://dev.azure.com/$ORG/myapp-lab/_apis/wit/workitems/3?api-version=7.1"
curl -s -o /dev/null -w "%{http_code}\n" -u ":$AZURE_DEVOPS_EXT_PAT" -X POST -H "Content-Type: application/json-patch+json" -d @patch.json \
  "https://dev.azure.com/$ORG/myapp-lab/_apis/wit/workitems/\$Task?api-version=7.1"
200
401
Experience the api-version rules:
curl -s -H "Authorization: Bearer $TOKEN" "https://dev.azure.com/$ORG/_apis/connectionData?api-version=7.1" | head -c 200; echo

In the official examples, connectionData is usually called with a preview version: if an error such as “The -preview flag must be supplied in the api-version for such requests.” is returned, the resource is still in preview at that version; change it to 7.1-preview to fix it. Whether a resource is preview is determined by the REST reference page.

Cleanup: User settings → Personal access tokens → Revoke; unset AZURE_DEVOPS_EXT_PAT TOKEN; az devops logout (if you used az devops login).

Case 1: project initialization script

Problem: Every new project needed 30 minutes of manual clicking: teams, areas, iterations, policies, groups, Wiki. Approach: A bash script chains az devops project create → team create → boards area/iteration → repos policy → security group → wiki create together, running as a service principal (steps that require PCA permissions are approved separately). Limits: Some settings (board columns, inherited-process rules) are not wrapped by the CLI, so call the work/processes API with az devops invoke .

Case 2: cleanup before global PAT retirement

Problem: Audit found 140 global PATs, many belonging to departed employees. Approach: A PCA lists and revokes them using the PAT lifecycle management API or Organization settings → Policies; turn on “Restrict global PAT creation” and “Maximum lifetime 90 days”; migrate scripts to service principals + Entra tokens; Git clients switch to GCM OAuth. Limits: The PAT list API returns only the caller's own PATs, so administrators need a dedicated management interface (follow the official documentation).

Case 3: reporting script throttled

Problem: A nightly report loops over 20,000 work items with individual GETs, which get delayed and time out. Approach: Switch to WIQL + a bulk interface with 200 IDs per batch, or use Analytics OData directly; read Retry-After with backoff and retry. Effect: Request count drops by two orders of magnitude.

Common errors and fixes

Before you can run Azure DevOps commands, you need to run the login command (az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.

Cause: The CLI has no usable credentials: not az login, the token has expired, or AZURE_DEVOPS_EXT_PAT was not exported.

az account show -o table || az login --allow-no-subscriptions
HTTP 401 Unauthorized / VS30063: You are not authorized to access https://dev.azure.com

Cause: The PAT has expired or been revoked, its scope is insufficient, the PAT does not belong to this organization (an organization-level PAT is valid for only one organization), or organization policy prohibits this kind of PAT; or the Entra token came from the wrong tenant.

curl -s -o /dev/null -w "%{http_code}\n" -u ":$AZURE_DEVOPS_EXT_PAT" "https://dev.azure.com/$ORG/_apis/projects?api-version=7.1"
az account show --query tenantId -o tsv   # Compare with the tenant connected to the organization: Organization settings → Microsoft Entra

Fix: Regenerate an organization-level PAT with minimal scope, or switch to an Entra token; in multi-tenant setups az login --tenant <id>.

HTTP 203 Non-Authoritative Information, returning an HTML sign-in page

Cause: The request was not authenticated (credentials missing or malformed, e.g. the Basic header has no colon), so the service redirects you to the sign-in page.

Fix: Check the request headers: Authorization: Basic base64(":PAT") or Bearer; for curl, use -u ":$PAT".

VssInvalidPreviewVersionException: The requested version "7.1" of the resource is under preview. The -preview flag must be supplied in the api-version for such requests.

Fix: Change it to api-version=7.1-preview (or the value specified in the documentation: -preview.N).

HTTP 429 Too Many Requests, or responses slow down with Retry-After / X-RateLimit-* response headers

Cause: Global throttling was triggered (resource consumption counted per identity).

Fix: Respect Retry-After; switch to bulk APIs; move reports to Analytics; use different identities for different automations to isolate the impact.

Command-line questions
1. Using an Entra token, list the titles of all active PRs in the myapp repository (curl).
TOKEN=$(az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv)
curl -s -H "Authorization: Bearer $TOKEN" "https://dev.azure.com/$ORG/myapp-lab/_apis/git/repositories/myapp/pullrequests?searchCriteria.status=active&api-version=7.1" | jq -r '.value[].title'
2. Use az devops invoke to list all branch policy configurations of myapp-lab.
az devops invoke --area policy --resource configurations --route-parameters project=myapp-lab --api-version 7.1 --query "value[].{id:id, type:type.displayName}" -o table
Scenario analysis question
A sync service running on an Azure VM reads Boards data every 5 minutes and currently uses an employee's global PAT. Give a migration plan.

Enable a system-assigned managed identity for the VM; in Azure DevOps Organization settings → Users, add the managed identity (assign an access level directly, since group rules do not apply to service principals or managed identities) and add it only to the Readers group of the projects it needs to read; in the service, use the Azure Identity library to obtain a token for the resource 499b84ac-1321-427f-aa17-267ca6975798 and call with Bearer; revoke the old global PAT; turn on organization policies that restrict global PATs and maximum PAT lifetime.

Verified teaching videos

No latest video that covers az devops CLI and Entra token authentication and that can be verified via YouTube oEmbed was found (earlier videos mostly use global PATs as examples, which no longer match current best practices). Follow the official documentation and this module's labs.

Official documentation

Storyboard script (about 90 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–20s
On screen: typing az login in the terminal brings up Entra sign-in and MFA in the browser.
Narration: Entra sign-in is preferred. The CLI gets a token valid for one hour, protected by multi-factor authentication and conditional access.
Shot 2 · 20–45s
On screen: a URL is split into five segments (organization, project, area, resource, api-version), each highlighted in turn.
Narration: every REST address is made up of these segments; api-version must be included, and preview versions add the preview suffix.
Shot 3 · 45–70s
On screen: a PAT card labelled “global” is stamped “being retired”, next to two dates.
Narration: global PATs are being retired, and the official dates are inconsistent, so follow the latest release notes. When a PAT is really needed, use only organization-level, least-privilege, short-lived ones.
Shot 4 · 70–90s
On screen: two requests: WIQL returns a list of IDs, and the bulk API returns the fields.
Narration: querying work items takes two steps: first get the IDs with WIQL, then fetch the fields in bulk to avoid throttling.
or score ≥ 70% on the quiz

Module 7 · Wiki, dashboards and service hooks

43:00 – 50:00 · A Wiki is essentially a Git repository; dashboards visualize queries and Analytics; service hooks push Azure DevOps events to external systems
7 minProject Wiki · code WikiWebhook endpoints must be HTTPS and publicly reachable★★★☆☆
Learning objectives
  • Distinguish a project Wiki (provisioned) from a code Wiki (published as code), and know their storage, versioning, permissions and editing methods.
  • Build dashboards for the team: query tiles, charts, sprint burndown, PR and build widgets, and understand the permission differences between team dashboards and project dashboards.
  • Create a service hook subscription (publisher + event + filter + consumer + action), and understand delivery, retries and disabling.
Prerequisites: Queries from Module 4, REST from Module 6. Importance:★★★☆☆

What: two kinds of Wiki

Project Wiki (Provisioned)Code Wiki (Published as code)
StorageA hidden Git repository inside the project (named {project name}.wiki), which can be clonedthe repository + branch + folder you specify (for example myapp of /docs)
QuantityOne per projectMultiple allowed (per repository, per folder)
EditingSaved directly in the web editor (each save is one commit)Through the code workflow: branch + PR (protected by branch policies)
VersioningSingle versionMultiple branches can be published as different versions (for example release/1.0)
Page orderEach folder's .order filealso uses .order
StakeholderViewable, but not editableNot accessible in private projects (requires Repos)
Best forTeam handbooks, meeting notes, process descriptionsDesign documents, API documents and runbooks that stay in the same version as the code

Wiki Markdown support: table of contents [[_TOC_]], sub-page list [[_TOSP_]], Mermaid diagrams (::: mermaid … :::),#42 work item references,@ user mentions, math formulas, code block copy buttons; attachments are stored in .attachments folder.

What: dashboards

  • Team dashboards and project dashboards two types; edit permissions can be set separately for each dashboard. Adding and configuring project dashboards requires Contributors or above; Stakeholders can only view them.
  • Common widgets: Query tile (query count), Chart for work items (chart based on a shared query), Sprint burndown / Sprint overview, Velocity, Cumulative flow diagram, Build history, Deployment status, Pull request, Markdown, Wiki.
  • Widgets such as burndown, velocity and cumulative flow are based on Analytics the service's calculations; query charts require the query to be a “flat list” saved as a shared query.

What: service hooks

ConceptDescriptionExample
PublisherThe service that generates the eventtfs (Boards, Repos, Build), Pipelines, Release
Event typeTrigger conditionworkitem.created,workitem.updated,git.push,git.pullrequest.created,git.pullrequest.merged,build.complete, pipeline run state changes
Filter (publisher inputs)Narrows the scopeArea path, work item type, repository, branch, field changes
Consumer + actionWho receives the event, and howWeb Hooks (HTTP POST JSON), Azure Service Bus, Azure Storage Queue, Slack, Jenkins, Trello, Grafana, etc.
SubscriptionA combination of the four items above; belongs to the project“New Bug in the web area → POST to the alerting system”

Why

Wiki keeps knowledge together with the project and under the same permission protection; dashboards let Stakeholders see progress without learning queries; service hooks connect Azure DevOps to an enterprise's chat, alerting, ITSM and automation systems without polling REST (polling is slow and easily throttled).

How: service hook delivery

  1. An event occurs (for example a PR is created), and the publisher generates an event object.
  2. It matches the event types and filter conditions of all subscriptions in the project.
  3. A notification is generated for each matching subscription, and the consumer action is executed (Web Hooks: HTTP POST with the event JSON as the body; basic authentication, custom request headers and resource detail level can be configured).
  4. A 2xx response counts as success; failures are retried,and a subscription that keeps failing enters probation and may be disabled automatically (see the official documentation for the exact retry count and interval). Each delivery's request and response can be viewed under Project settings → Service hooks → History.

When

  • Team conventions and processes → project Wiki; documentation that follows the code version → code Wiki (stored in /docs, reviewed via PR).
  • Only need notifications to Teams/email → consider the built-in Notifications first, which are simpler than service hooks; need to drive an external system → service hooks.
  • High-reliability integration → use Azure Service Bus / Storage Queue as the consumer, and let downstream systems consume and retry on their own.
Common misconceptions① “A Wiki cannot be managed with Git” — a project Wiki is a Git repository, so it can be git clone. ② “Service hooks can deliver to internal addresses” — the service sends requests from the Microsoft cloud, so the target must be publicly reachable (for internal systems, relay through Service Bus / a queue, or use a gateway). ③ “The Webhook body contains the full work item” — by default it includes resource details, but how many fields are included depends on the “resource detail level” setting, so consider the risk of leaking sensitive fields. ④ “Dashboard charts can use WIQL tree queries directly” — query charts require a flat-list query.

Structure diagram: the two kinds of Wiki storage

Project Wiki: myapp-lab.wiki (hidden Git repository) /Home.md/Runbook.md/Runbook/On-call.md/.order/.attachments/diagram.png Web edit → committed directly to the wikiMaster branchgit clone https://dev.azure.com/org/myapp-lab/_git/myapp-lab.wiki Code Wiki: myapp-docs → repository myapp Branch main, mapped to path /docs/docs/architecture.md/docs/api.md/docs/.order Edit → new branch → PR → branch policy → mergeCan additionally publish release/1.0 as a second versionNot accessible to Stakeholders (private projects)
Figure 7-1: the project Wiki suits quick collaboration; the code Wiki suits documentation that stays in the same version as the code and goes through review

Data flow diagram: service hooks

Eventworkitem.createdBug #57 in web Subscription matchType = BugArea UNDER web NotificationWeb Hooks actionHTTP POST JSON 2xx successHistory record FailureRetry → probation Keeps failingSubscription disabled
Figure 7-2: service hooks are push-based; the endpoint should return 2xx quickly, and heavy work should go into a queue for asynchronous processing

Step-by-step animation: service hook delivery and retries

Select the endpoint behavior, then play. The animation shows event matching, the HTTP request body, the endpoint response, failure retries and changes in subscription status.

Ready.

Command table

CommandPurposeKey parameters
az devops wiki createCreate a project Wiki or publish a code Wiki--type projectwiki|codewiki,--repository,--mapped-path,--version
az devops wiki list / showList / view Wikis--wiki
az devops wiki page create / show / update / deleteCreate, read, update and delete pages--path,--content or --file-path,--version (an ETag version must be supplied when updating)
az devops invoke --area hooks --resource subscriptionsService hook subscriptions (not wrapped by the CLI)--http-method POST,--in-file
az devops invoke --area dashboard --resource dashboardsDashboards (not wrapped by the CLI)--route-parameters project=… team=…
# Project Wiki + one runbook page
az devops wiki create --name myapp-lab.wiki --type projectwiki
az devops wiki page create --wiki myapp-lab.wiki --path "Runbook" \
  --content $'# myapp runbook\n\n[[_TOC_]]\n\n## Health check\n`GET /healthz` returns `ok`. Related story: #'"$STORY"$'\n'

# Code Wiki: publish the /docs folder of the main branch of the myapp repository (the folder must already exist and be committed)
az devops wiki create --name myapp-docs --type codewiki --repository myapp --mapped-path /docs --version main
az devops wiki list --query "[].{name:name, type:type, repo:repositoryId}" -o table

# Updating a page requires the ETag (version)
ETAG=$(az devops wiki page show --wiki myapp-lab.wiki --path "Runbook" --query eTag -o tsv)
az devops wiki page update --wiki myapp-lab.wiki --path "Runbook" --version "$ETAG" --file-path ./runbook.md
Name            Type         Repo
--------------  -----------  ------------------------------------
myapp-lab.wiki  projectWiki  5e3a2f8c-…
myapp-docs      codeWiki     9b1d4c77-…

Service hook: POST to the Webhook when a Bug is created in the web area

PROJ_ID=$(az devops project show --project myapp-lab --query id -o tsv)
cat > hook.json <<EOF
{
  "publisherId": "tfs",
  "eventType": "workitem.created",
  "resourceVersion": "1.0",
  "consumerId": "webHooks",
  "consumerActionId": "httpRequest",
  "publisherInputs": { "projectId": "$PROJ_ID", "workItemType": "Bug", "areaPath": "\\\\myapp-lab\\\\web" },
  "consumerInputs":  { "url": "https://example.com/hooks/azdo" }
}
EOF
az devops invoke --area hooks --resource subscriptions --http-method POST --in-file hook.json --api-version 7.1 \
  --query "{id:id, status:status, eventType:eventType}"
az devops invoke --area hooks --resource subscriptions --api-version 7.1 \
  --query "value[].{id:id, event:eventType, consumer:consumerId, status:status}" -o table
{ "eventType": "workitem.created", "id": "c3e0a5f2-…", "status": "enabled" }

How to verify: Create a new Bug in the web area; under Project settings → Service hooks → that subscription → History, you should see one request and a 200 response. Common errors: Backslash escaping in area paths (in JSON it is \\, and the heredoc adds another layer); if you are unsure of the input names, create one subscription in the web UI, then use GET subscriptions to inspect its publisherInputs and use it as a template (most reliable). Production use: Store subscription definitions in the repository and deploy them to each project through scripts.

Goal: Create a project Wiki and a runbook page, create a team dashboard, create a Webhook subscription, and observe the delivery history. Cost: None. Security: The Webhook endpoint can be an HTTPS service you control (for example a temporary Azure Function, or a test service such as webhook.site — do not send sensitive data, and delete the subscription after the lab). Permissions: Creating a service hook subscription requires Project Administrators (or being granted permission to edit subscriptions).

Wiki: run the first block on the “Commands” page; open Overview → Wiki and confirm the Runbook page and table of contents render; click the page's “...” → Clone wiki to get the Git address.
Dashboard: Overview → Dashboards → New dashboard (Team: web) → add Sprint burndown, a Query tile (shared query “Current sprint”, threshold > 10 turns red), Pull request (repository myapp), and Markdown (linking to the Runbook). Sign in as pm (Stakeholder) to verify that it is view-only.
Shared query (needed for dashboard charts):
az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject]=@project AND [System.IterationPath]=@CurrentIteration('[myapp-lab]\web Team')" -o table
# In the web Queries page, save that query as Shared Queries/Current sprint
Service hook: replace the url in hook.json with your endpoint, run the second block on the “Commands” page, and create a Bug in the web area:
az boards work-item create --type Bug --title "healthz intermittent 500" --area 'myapp-lab\web'
In the JSON received by the endpoint, eventType is workitem.created,resource.fields contains the title and area.
Cleanup:
SUB=$(az devops invoke --area hooks --resource subscriptions --api-version 7.1 --query "value[?eventType=='workitem.created'].id | [0]" -o tsv)
az devops invoke --area hooks --resource subscriptions --route-parameters subscriptionId=$SUB --http-method DELETE --api-version 7.1

Case 1: on-call runbook kept in a code Wiki

Problem: The runbook lives in the project Wiki, and it often drifts out of step with the code. Approach: Put /docs/runbook into the myapp repository and publish it as a code Wiki; changes go through PRs and branch policies; release branches release/* serve as historical versions. Limits: Stakeholders (such as an on-call manager) cannot see the code Wiki in a private project; they need Basic, or a summary placed in the project Wiki.

Case 2: Bugs enter ITSM automatically

Problem: Production Bugs must be synced to ServiceNow tickets. Approach: Service hook workitem.created / workitem.updated (filter Bug + tag prod) → Azure Service Bus queue → integration function consumes and calls the ITSM API; the ticket number is written back to a work item field (REST PATCH). Effect: Messages are kept in the queue when the endpoint fails, so consecutive Webhook failures do not get the subscription disabled.

Case 3: management dashboard

Approach: The project dashboard holds each team's Velocity, Cumulative flow, delivery plan links and Deployment status, and is opened for viewing to Stakeholders. Limits: Analytics has processing latency, so data may be several minutes behind real time; Stakeholders in private projects cannot see query charts.

Common errors and fixes

Service hook subscription status changes to “Disabled due to failures” / On probation

Cause: The endpoint keeps returning non-2xx responses, times out, or has an invalid certificate.

Fix: Check the request and response in the subscription's History; after fixing the endpoint, re-enable the subscription (Enable); the endpoint should return 2xx quickly, with long-running work moved to a queue.

The Webhook endpoint receives no requests

Cause: The event does not match the filter (area path, work item type, repository, branch); the endpoint is unreachable from the internal network; the firewall does not allow it.

Fix: Send a test notification with the “Test” button on the subscription page; loosen the filter to verify; for internal systems, switch to relaying through Service Bus.

Updating a Wiki page fails: The page '…' specified in the update operation has been changed. Please refresh and try again. (version mismatch)

Cause: The update did not supply an ETag, or supplied a stale one (--version).

Fix: First run az devops wiki page show to fetch the latest eTag, then update.

Dashboard widget shows “This widget requires a shared query” / the chart cannot select a query

Cause: The query is saved in My Queries, or it is a tree or direct-link query.

Fix: Save it as a flat-list query under Shared Queries.

Command-line questions
1. List the contents of the Runbook page in the myapp-lab project Wiki.
az devops wiki page show --wiki myapp-lab.wiki --path "Runbook" --include-content --query page.content -o tsv
2. List all service hook subscriptions and their status.
az devops invoke --area hooks --resource subscriptions --api-version 7.1 --query "value[].{event:eventType, consumer:consumerId, status:status}" -o table
Scenario analysis question
The team wants to notify the internal release system every time a PR is merged to main (it must not be exposed to the internet). How would you design this?

Service hooks originate from the Microsoft cloud and cannot reach the internal network directly. Solution: subscribe git.pullrequest.merged (filter repository myapp, target branch main), with Azure Service Bus (or Storage Queue) as the consumer; the internal release system actively connects to the queue and consumes messages (an outbound connection is enough); alternatively, use a self-hosted agent (inside the internal network) in the pipeline to call the release system during the CI run after merge.

Verified teaching videos

No video specifically covering Azure DevOps Wikis and service hooks that can be verified via YouTube oEmbed was found. The comprehensive video has a brief tour of Wikis and dashboards:

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
English · comprehensive demo

Official documentation

Storyboard script (about 80 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–20s
On screen: a Wiki page opens, revealing a Git repository icon behind it.
Narration: a project Wiki is actually a hidden Git repository, while a code Wiki publishes the documentation folder in the repository directly.
Shot 2 · 20–40s
On screen: the burndown chart, query tile and PR widget appear on the dashboard one after another.
Narration: dashboards visualize queries and analytics data, so people who don't write queries can still follow progress.
Shot 3 · 40–65s
On screen: after a Bug is created, an envelope flies from Azure DevOps to an external system and returns a green 200.
Narration: service hooks push events to external systems; a 200 response means success.
Shot 4 · 65–80s
On screen: the envelope repeatedly hits a wall and turns red, and the subscription switch turns off automatically.
Narration: when an endpoint keeps failing, the subscription is paused or even disabled; for reliable integration, relay through a queue.
or score ≥ 70% on the quiz

Module 8 · Collaboration readiness review and troubleshooting basics

50:00 – 60:00 · Run a 12-item review before handing over to the team; when something goes wrong, first decide which layer it is: “authentication, licensing, membership, permissions or policies”
10 minInteractive troubleshooting treeDivide into layers first, then act★★★★★
Learning objectives
  • Use a 12-item checklist to review whether a project is “ready to hand over to the team”, and use the CLI to check most of the items automatically.
  • Master the five-layer troubleshooting method: authentication → organization membership and access level → project membership → object permissions → policies / rules.
  • Quickly locate the most common collaboration problems: TF401027, 403/401, project not found, insufficient license, invalid PAT.
Prerequisites: Modules 1–7. Importance:★★★★★

What: the 12 items of the collaboration readiness review

#Check itemStandardHow to check
1Organization connected to an Entra tenantUse a work account; access ends when the person leavesOrganization settings → Microsoft Entra
2PCA members2–3 people, no shared accountsaz devops security group membership list (organization level)
3Access levels assigned through group rulesEntra group → Basic/StakeholderOrganization settings → Users → Group rules
4Project members added through groupsNo ACEs granted directly to individualsSecurity page / permission audit script
5Valid Users default permissions unchangedView project-level information not deniedProject settings → Permissions
6Teams, areas and iterations configuredEach team has a default area, plus the current and next sprintaz boards area/iteration team list
7Process customized (if needed)Use an inherited process; do not change the system processaz devops project show
8Branch policies for mainReviewers, linked work items, comment resolution, merge types (build validation is added in Lesson 2)az repos policy list
9Branch permissions for mainForce push denied; Bypass granted only to the emergency groupBranch Security
10PAT policyRestrict global PATs, limit maximum lifetime; use service principals for automationOrganization settings → Policies / Entra tenant policies
11Wiki and dashboardsProject Wiki home page, runbook, team dashboardaz devops wiki list
12Notifications and integrationsTeam notifications, necessary service hooks, no failing subscriptionsProject settings → Service hooks

Why: why troubleshoot in layers

Reports of the form “I can't open it / can't push / can't see it” may come from five completely different layers. Ruling them out in order avoids dangerous “fixes” such as “just add him to Project Administrators and see”.

How: the five-layer troubleshooting method

LayerTypical symptomsTypical errorsFirst diagnostic command
1 AuthenticationCLI/script 401; browser repeatedly asks for sign-in; returns HTMLVS30063, HTTP 401/203, “you need to run the login command”az account show; curl -w "%{http_code}"
2 Organization membership and access levelOrganization won't open; Repos / Test Plans missing from the menuTF400813; “You don't have access”az devops user show --user …
3 Project membershipProject “not found”VS800075, TF200016 (project not found)az devops project list (as that user)
4 Object permissionsCan view but not edit; push rejected; query folder not visibleTF401027, HTTP 403az devops security permission show; Why?
5 Policies / rulesDirect push rejected; PR cannot be completed; work item cannot be savedTF402455, TF401320 (rule validation)az repos pr policy list; work item rules

When

Hold a review before project handover, every quarter, and after organization restructuring; for any access ticket, first locate the layer using the five-layer method, then change the smallest layer possible.

Common misconceptions① “403 means a licensing problem” — 403 is usually a permission problem (layer 4); licensing problems usually show up as missing menus or an inability to assign an access level. ② “Not seeing the project means it was deleted” — more often the user is not a project member. ③ “A PAT suddenly stopping working is a service outage” — usually it has expired, been revoked, been blocked by policy, or global PATs have been retired. ④ “Adding someone to Project Administrators fixes everything” — it cannot fix authentication, licensing or organization-level problems, and it violates least privilege.

Layer diagram: the five gates an access must pass

① AuthenticationEntra / MSA / PAT401 · VS30063 ② Organization and licensingUser exists? Access level?TF400813 · menu missing ③ Project membershipView project-level infoVS800075 · TF200016 ④ Object permissionsInheritance · deny precedenceTF401027 · 403 ⑤ Policies / rulesBranch policies · process rulesTF402455 · TF401320 Rule out from left to right: if an earlier layer fails, changes to later layers are futile
Figure 8-1: five-layer troubleshooting: authentication → organization and licensing → project membership → object permissions → policies and rules

Review flow chart

Run the check scriptCLI automatic items 8/12 Manual checksEntra, group rules, PAT policy Scoring≥ 10 items: deliverable Record in the WikiReview date and owner Quarterly re-reviewAudit log
Figure 8-2: review results are written into the Wiki, forming an auditable record

Interactive: collaboration readiness review scorer

Tick off the conditions that myapp-lab currently meets, one by one. The scorer gives the total score, the highest-risk missing items, and the corresponding fix commands. Tick states are saved in this browser.

Command table (common for troubleshooting)

CommandLayer it is used forDescription
az account show1 AuthenticationCurrent signed-in identity and tenant
curl -s -o /dev/null -w "%{http_code}" …1 AuthenticationQuick check of 200/203/401/403
az devops user show --user2 LicensingAccess level, source, status, last access time
az devops security group membership list --id <user> --relationship memberof3 MembershipWhich groups the user belongs to
az devops security permission show4 PermissionsEffective permissions and inheritance source
az repos policy list / az repos pr policy list5 PoliciesBranch policies and PR evaluation
az ... --debugAllPrint the actual REST requests and responses, to locate CLI problems

Readiness review check script (checks 8 items automatically)

#!/usr/bin/env bash
# ready-check.sh — read-only check, makes no changes
set -u
P=myapp-lab; R=myapp
ok(){ echo "  [OK]   $1"; }; bad(){ echo "  [MISS] $1"; }
echo "== myapp-lab collaboration readiness review =="
PROC=$(az devops project show --project $P --query capabilities.processTemplate.templateName -o tsv)
[ -n "$PROC" ] && ok "Process: $PROC" || bad "Cannot read project"
[ "$(az devops team list --query 'length(@)' -o tsv)" -ge 2 ] && ok "Teams ≥ 2" || bad "Only the default team"
[ "$(az boards area team list --team web --query 'length(values)' -o tsv 2>/dev/null || echo 0)" -ge 1 ] && ok "web team has areas" || bad "web team has no areas"
[ "$(az boards iteration team list --team web --query 'length(@)' -o tsv 2>/dev/null || echo 0)" -ge 2 ] && ok "web team has ≥2 sprints" || bad "Not enough sprints"
RID=$(az repos show --repository $R --query id -o tsv)
N=$(az repos policy list --repository-id $RID --branch main --query "length([?isBlocking])" -o tsv)
[ "$N" -ge 3 ] && ok "main has $N required policies" || bad "main has only $N required policies"
[ "$(az devops wiki list --query 'length(@)' -o tsv)" -ge 1 ] && ok "Wiki exists" || bad "No Wiki"
PCA=$(az devops security group list --scope organization --query "graphGroups[?displayName=='Project Collection Administrators'].descriptor" -o tsv)
C=$(az devops security group membership list --id "$PCA" --query 'length(keys(@))' -o tsv)
[ "$C" -le 3 ] && ok "$C PCA members" || bad "$C PCA members (≤3 recommended)"
F=$(az devops invoke --area hooks --resource subscriptions --api-version 7.1 --query "length(value[?status!='enabled'])" -o tsv)
[ "$F" -eq 0 ] && ok "All service hooks enabled" || bad "$F service hooks not enabled"
echo "Manual checks: Entra connection, group rules, Valid Users default permissions, PAT policy"
== myapp-lab collaboration readiness review ==
  [OK]   Process: Agile
  [OK]   Teams ≥ 2
  [OK]   web team has areas
  [OK]   web team has ≥2 sprints
  [OK]   main has 4 required policies
  [OK]   Wiki exists
  [OK]   1 PCA member
  [OK]   All service hooks enabled
Manual checks: Entra connection, group rules, Valid Users default permissions, PAT policy

PCA group members may include other groups (for example, the group the organization owner belongs to); expand nested groups when counting. --debug The output includes request headers; remove tokens before sharing logs.

Goal: Deliberately create 3 typical faults, locate them with the five-layer method, and fix them. Environment: myapp-lab + alice (Basic) + pm (can be re-added as Stakeholder). Cost: None.

Fault 1 (layer 1): set an incorrect PAT and run the CLI:
AZURE_DEVOPS_EXT_PAT=invalid az devops project list -o table 2>&1 | tail -2
curl -s -o /dev/null -w "%{http_code}\n" -u ":invalid" "https://dev.azure.com/$ORG/_apis/projects?api-version=7.1"

Observe 401 (or 203). Fix: unset the variable and switch to az login. Note: a PAT in an environment variable takes precedence over the credentials of az login credentials are used.

Fault 2 (layer 2): downgrade alice to Stakeholder and have her clone myapp:
az devops user update --user alice@contoso.com --license-type stakeholder

alice's Repos menu disappears and the clone fails. Use az devops user show to locate it, then change it back to express.

Fault 3 (layer 4): on main, deny Contributors “Contribute to pull requests”, then have alice comment on a PR: the web UI says there is no permission (TF401027 PullRequestContribute). Use Why? to locate the branch-level Deny, then set it back to Not set.
Run the readiness review: from the “Commands” page, run the ready-check.sh, tick the results in the scorer on the “Animation” page, and write the score to the Wiki page “Readiness review”.
Cleanup: confirm that alice is back to Basic and the branch permission is back to Not set.

Case 1: everyone gets 401 on Monday morning

Symptom: The CI scripts and developers' npm and Git all get 401. Diagnosis: Layer 1; all the credentials came from one service account's global PAT, which expired over the weekend. Fix: Reissue an organization-level PAT in the short term; in the long term switch to service principals + Entra tokens, use GCM OAuth for Git, and use System.AccessToken for pipelines. Prevention: PAT expiry alerts; organization policy restricting global PATs.

Case 2: new employee “can't see the project”

Diagnosis: Layer 2 is fine (Basic, from a group rule); Layer 3: the group rule assigned only the access level, without the project membership option ticked. Fix: Edit the group rule, add myapp-lab → Contributors, and Re-evaluate.

Case 3: a PR can never be completed

Diagnosis: Layers 1–4 are all fine; Layer 5: az repos pr policy list shows “Comment requirements: rejected”, because a comment that had been marked “Won't fix” was reactivated. Fix: Resolve the comment; the team agrees to close comment threads with “Resolved / Won't fix”.

Interactive troubleshooting tree: collaboration issues

Answer the questions step by step, starting from the symptom; the tree gives the diagnosis, commands and fix.

Quick reference: common errors

TF401027: You need the Git 'GenericContribute' permission to perform this action.

Layer 4. Use the Module 2 method to view effective permissions and Why?; check branch-level Deny and Readers-only memberships.

TF200016: The following project does not exist: myapp-lab. Verify that the name of the project is correct and that the project exists on the specified Azure DevOps Server.

Layer 3 (or the project name is misspelled / renamed / deleted). az devops project list Run as that user; a project administrator adds the user to Readers/Contributors; a deleted project can be recovered from the recycle bin within 28 days.

HTTP 403 Forbidden (REST), while the same user can see the resource in the web UI

Layer 4 or token scope: the PAT lacks the scope the API requires (for example, it was given only Work Items Read but calls the Code API); or a management interface requiring higher permissions was called. Retry with an Entra token to compare.

Insufficient license: the user can sign in but lacks Repos / Test Plans / backlog ordering

Layer 2. az devops user show Check the access level and its source; Stakeholder → Basic; Test Plans → Basic + Test Plans.

Command-line questions
1. Check alice's access level and license source.
az devops user show --user alice@contoso.com --query "accessLevel.{level:licenseDisplayName, source:assignmentSource, status:status}"
2. Use --debug to find out az repos list the REST URLs that are actually called.
az repos list --debug 2>&1 | grep -Eo "https://dev.azure.com/[^ ']+_apis/git/repositories[^ ']*" | head -1
Scenario analysis question
An outsourced developer reports: “I could push yesterday; today the push reports TF401027, and Repos looks normal in the web UI.” Give the troubleshooting order using the five-layer method, and the most likely cause.

Layer 1: they can see Repos, so authentication is fine; Layer 2: the Repos menu is present, so the access level is at least Basic; Layer 3: they can open the repository, so project membership is fine; Layer 4 (most likely): yesterday they were added to a group that denies Contribute on the repository or branch (for example, the Entra group sg-vendors synced to Contractors), or an administrator set an explicit Deny on the branch. Use Security → Why? or az devops security permission show to confirm the source and correct it. Layer 5 policies affect only direct pushes to main (TF402455), which is different from TF401027.

Verified teaching videos

No video specifically covering Azure DevOps collaboration troubleshooting that can be verified via YouTube oEmbed was found. For review, you can watch:

▶
Azure DevOps: Zero to Hero Tutorial — DevOps on Azure
English · comprehensive review

Official documentation

Storyboard script (about 90 seconds)

This courseware cannot directly generate video or MP3 files; a storyboard and narration script are provided.

Shot 1 · 0–20s
On screen: five doors lined up in order: authentication, licensing, project, permissions, policies.
Narration: every access problem has to pass through these five doors; start from the first one when troubleshooting.
Shot 2 · 20–45s
On screen: curl in the terminal returns 401, with “Layer 1” written beside it.
Narration: a 401, or a sign-in page returned, is an authentication problem; check whether the token has expired or belongs to another organization.
Shot 3 · 45–70s
On screen: the TF401027 error and the Why? pop-up side by side.
Narration: TF401027 is a permission problem; click Why to find which group the denial comes from.
Shot 4 · 70–90s
On screen: the twelve checklist items are ticked off one by one, and the score bar turns green.
Narration: run the twelve-item review before handing over to the team, and write the results into the Wiki.
or score ≥ 70% on the quiz

Command cheat sheet

The az devops / boards / repos commands used in this lesson, REST templates, a quick troubleshooting table and recommended configurations
azure-devops extension 1.0.11api-version 7.1

1. Install and sign in

az extension add --name azure-devops
az login --allow-no-subscriptions
az devops configure --defaults \
  organization=https://dev.azure.com/$ORG project=myapp-lab
az devops configure --list
# PAT scenarios only
export AZURE_DEVOPS_EXT_PAT=***   # or az devops login

2. Projects and teams

az devops project create --name myapp-lab --process Agile \
  --visibility private --source-control git
az devops project list -o table
az devops team create --name web
az devops team list-member --team web -o table

3. Security groups and permissions

az devops security group list --project myapp-lab
az devops security group create --name Contractors --project myapp-lab
az devops security group membership add --group-id $GRP --member-id u@x.com
GIT_NS=2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87
az devops security permission show --id $GIT_NS --subject u@x.com \
  --token "repoV2/$PROJ_ID/$REPO_ID"
az devops security permission update --id $GIT_NS --subject $GRP \
  --token "repoV2/$PROJ_ID/$REPO_ID" --deny-bit 4
az devops security permission reset ... --permission-bit 4

4. Users and licensing

az devops user list --top 100 -o table
az devops user add --email-id u@x.com --license-type stakeholder
az devops user update --user u@x.com --license-type express   # Basic
az devops user update --user u@x.com --license-type advanced  # +Test Plans
az devops user remove --user u@x.com --yes

5. Boards

az boards area project create --name web
az boards area team add --team web --path '\myapp-lab\web' --set-as-default
az boards iteration project create --name "Sprint 1" \
  --start-date 2026-11-16 --finish-date 2026-11-27
az boards iteration team add --team web --id $ITER_GUID
az boards work-item create --type "User Story" --title "..." \
  --area 'myapp-lab\web' --iteration 'myapp-lab\Sprint 1'
az boards work-item relation add --id 3 --relation-type parent --target-id 1
az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE ..."

6. Repos and PRs

az repos create --name myapp
az repos import create --git-source-url https://github.com/o/r.git --repository myapp
C="--repository-id $REPO_ID --branch main --blocking true --enabled true"
az repos policy approver-count create $C --minimum-approver-count 1 \
  --creator-vote-counts false --allow-downvotes false --reset-on-source-push true
az repos policy work-item-linking create $C
az repos policy comment-required create $C
az repos policy merge-strategy create $C --allow-squash true
az repos pr create --source-branch feature/x --target-branch main \
  --work-items 3 --auto-complete true --squash true --transition-work-items true
az repos pr set-vote --id 7 --vote approve
az repos pr policy list --id 7 -o table

7. REST templates

TOKEN=$(az account get-access-token \
  --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv)
H="Authorization: Bearer $TOKEN"
B=https://dev.azure.com/$ORG
curl -s -H "$H" "$B/_apis/projects?api-version=7.1"
curl -s -H "$H" -H "Content-Type: application/json" -d @wiql.json \
  "$B/myapp-lab/_apis/wit/wiql?api-version=7.1"
curl -s -H "$H" "$B/myapp-lab/_apis/wit/workitems?ids=1,3&api-version=7.1"
curl -s -H "$H" "$B/myapp-lab/_apis/git/repositories/myapp/pullrequests?api-version=7.1"
curl -s -H "$H" "$B/myapp-lab/_apis/policy/configurations?api-version=7.1"
# PAT: curl -u ":$PAT" ...

8. Wiki and service hooks

az devops wiki create --name myapp-lab.wiki --type projectwiki
az devops wiki create --name myapp-docs --type codewiki \
  --repository myapp --mapped-path /docs --version main
az devops wiki page create --wiki myapp-lab.wiki --path Runbook --file-path runbook.md
az devops invoke --area hooks --resource subscriptions \
  --http-method POST --in-file hook.json --api-version 7.1
az devops invoke --area hooks --resource subscriptions --api-version 7.1 -o table

Quick troubleshooting table

Symptom / errorLayerMost likely causeFirst step
HTTP 401, VS30063, HTML sign-in page returned (203)AuthenticationPAT expired / revoked / wrong organization; malformed request headercurl -w "%{http_code}"; switch to an Entra token
“you need to run the login command”AuthenticationCLI has no credentialsaz login --allow-no-subscriptions
TF400813 not authorized to access this resourceOrganizationUser is not in the organization, or the wrong account was usedAdministrator az devops user show
Repos / Test Plans menu missingLicensingStakeholder; no Test Plans license; service turned offaz devops user show; Project settings → Overview
No hosted parallelism has been purchased or grantedBillingBilling not set up; hosted free allowance not enabledSet up billing or use a self-hosted agent
VS800075 / TF200016 project does not existProject membershipNo View project-level information; wrong project nameAdd to Readers/Contributors
TF401027 GenericContribute / PullRequestContributePermissionsA group is denied on the repository / branchSecurity → Why?
TF402455 Pushes to this branch are not permittedPoliciesBranch has a required policyGo through a PR
TF401347 Invalid tree nameDataArea / iteration path does not exist or has the wrong formataz boards area project list
-preview flag must be suppliedAPIPreview resource missing -previewChange api-version=7.x-preview
HTTP 429 / Retry-AfterAPIThrottlingBack off and retry; bulk APIs
Service hook Disabled / probationIntegrationEndpoint keeps failingCheck History; enable again after fixing

Recommended configuration snippets

main branch baseline (policy configuration file, used with az repos policy create)

{
  "isEnabled": true,
  "isBlocking": true,
  "type": { "id": "fa4e907d-c16b-4a4c-9dfa-4906e5d171dd" },
  "settings": {
    "minimumApproverCount": 1,
    "creatorVoteCounts": false,
    "allowDownvotes": false,
    "resetOnSourcePush": true,
    "scope": [ { "repositoryId": null, "refName": "refs/heads/main", "matchKind": "Exact" } ]
  }
}

fa4e907d-… is the “Minimum number of reviewers” policy type ID; repositoryId: null means all repositories in the project. You can first az repos policy show --id 1 export existing policies as a template.

Team and permission baseline

Organization
  PCA: 2–3 protected administrator accounts
  Group rules: sg-eng → Basic + project Contributors
          sg-business → Stakeholder + project Contributors
  Policies: restrict global PATs, PAT maximum 90 days, disallow public projects
Project myapp-lab (Agile-myapp inherited process)
  Teams: web, api (each with its default area + Sprint 1..n)
  Group: Contractors (repository-level Allow for specified repositories)
      Hotfix Approvers (main: Bypass policies, audited)
  main: reviewers ≥1, linked work items, comment resolution, Squash,
        Force push = Deny (Contributors, Project Admins)
  Wiki: project Wiki (handbook) + code Wiki /docs (runbooks)

Capstone lab + final quiz

Use only the CLI to build a “collaboration-ready” project from scratch, then verify independently with REST
About 30 minutesFree tierA second account is needed to complete the review step
Scenario: the company is opening a new project for myapp myapp-final, for the web team. Requirements: Agile process; the web team owns areas myapp-final\web and two sprints; the Contractors group can only read the myapp repository; main has 4 required policies; one user story is implemented through a PR and resolved automatically; finally, generate an acceptance report with REST. All steps must be scriptable (no web UI, except for review votes).
Create the project, repository and teams
set -euo pipefail
ORG=contoso-lab; P=myapp-final
az devops configure --defaults organization=https://dev.azure.com/$ORG project=$P
az devops project create --name $P --process Agile --visibility private --source-control git
az repos create --name myapp
az repos import create --git-source-url https://github.com/<your-account>/myapp.git --repository myapp
az devops team create --name web
Areas and iterations
az boards area project create --name web
az boards area team add --team web --path "\\$P\\web" --set-as-default --include-sub-areas true
for s in "Sprint 1:2026-11-16:2026-11-27" "Sprint 2:2026-11-30:2026-12-11"; do
  IFS=: read -r name start end <<< "$s"
  az boards iteration project create --name "$name" --start-date $start --finish-date $end -o none
  id=$(az boards iteration project list --depth 1 --query "children[?name=='$name'].identifier" -o tsv)
  az boards iteration team add --team web --id $id -o none
done
az boards iteration team list --team web -o table
Security group: Contractors read-only on myapp
PROJ_ID=$(az devops project show --project $P --query id -o tsv)
REPO_ID=$(az repos show --repository myapp --query id -o tsv)
GIT_NS=2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87
az devops security group create --name Contractors --project $P -o none
GRP=$(az devops security group list --project $P --query "graphGroups[?displayName=='Contractors'].descriptor" -o tsv)
az devops security permission update --id $GIT_NS --subject "$GRP" --token "repoV2/$PROJ_ID/$REPO_ID" --allow-bit 2 -o none   # Read
az devops security permission update --id $GIT_NS --subject "$GRP" --token "repoV2/$PROJ_ID/$REPO_ID" --deny-bit 4 -o none   # Contribute
main branch policies
C="--repository-id $REPO_ID --branch main --blocking true --enabled true"
az repos policy approver-count create $C --minimum-approver-count 1 --creator-vote-counts false --allow-downvotes false --reset-on-source-push true -o none
az repos policy work-item-linking create $C -o none
az repos policy comment-required create $C -o none
az repos policy merge-strategy create $C --allow-squash true --allow-no-fast-forward false -o none
Work item hierarchy
EPIC=$(az boards work-item create --type Epic --title "Observability" --area "$P\\web" --query id -o tsv)
STORY=$(az boards work-item create --type "User Story" --title "Provide /healthz" --area "$P\\web" --iteration "$P\\Sprint 1" \
  --fields "Microsoft.VSTS.Scheduling.StoryPoints=3" --query id -o tsv)
az boards work-item relation add --id $STORY --relation-type parent --target-id $EPIC -o none
PR association with work items (requires a second account to approve)
git clone "$(az repos show --repository myapp --query remoteUrl -o tsv)" myapp-final && cd myapp-final
git switch -c feature/healthz-$STORY
printf '\n## Health\n`GET /healthz` -> ok\n' >> README.md
git commit -am "docs: healthz (#$STORY)" && git push -u origin HEAD
PR=$(az repos pr create --source-branch feature/healthz-$STORY --target-branch main --title "healthz docs" \
  --work-items $STORY --auto-complete true --squash true --delete-source-branch true --transition-work-items true \
  --query pullRequestId -o tsv)
echo "Ask a reviewer to approve PR !$PR"
REST acceptance report
TOKEN=$(az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv)
H="Authorization: Bearer $TOKEN"; B="https://dev.azure.com/$ORG/$P/_apis"
echo "Teams:";   curl -s -H "$H" "https://dev.azure.com/$ORG/_apis/projects/$P/teams?api-version=7.1" | jq -r '.value[].name'
echo "Policies:";   curl -s -H "$H" "$B/policy/configurations?api-version=7.1" | jq -r '.value[] | "\(.type.displayName)\tblocking=\(.isBlocking)"'
echo "PR:";     curl -s -H "$H" "$B/git/repositories/myapp/pullrequests/$PR?api-version=7.1" | jq -r '"\(.pullRequestId) \(.status) \(.mergeStatus // "")"'
echo "Story:";   curl -s -H "$H" "$B/wit/workitems/$STORY?\$expand=relations&api-version=7.1" \
  | jq -r '"\(.id) \(.fields."System.State") links=\([.relations[]?.attributes.name] | join(","))"'
Teams:
myapp-final Team
web
Policies:
Minimum number of reviewers	blocking=true
Work item linking	blocking=true
Comment requirements	blocking=true
Require a merge strategy	blocking=true
PR:
12 completed succeeded
Story:
2 Resolved links=Parent,Pull Request,Commit
Cleanup (optional):
PID=$(az devops project show --project myapp-final --query id -o tsv)
az devops project delete --id $PID --yes   # Goes to the recycle bin; recoverable within 28 days

Acceptance checklist

Open-ended self-check

1. Why is it said that “a team is not a security boundary”? If the web team should be able to edit only work items in its own area, what should you do?

A team only decides the view and cadence. To restrict editing, set permissions on the area paths: make Contributors read-only on the root area (or deny “Edit work items in this node” to the relevant group), and on web area, explicitly allow the web team's security group; note that a Deny from another group on the same scope still takes precedence.

2. A user belongs to both Readers and Contributors, and Readers has no settings at the repository level. Can they push? What if Readers is denied Contribute at the repository level?

In the first case, yes: Readers is Not set, which does not override Contributors' Allow. In the second case, no: Deny takes precedence on the same scope.

3. A team of 50 has 20 business users who only look at boards. How can you minimize licensing cost without hurting collaboration?

Set business users to Stakeholder (free; in private projects they have no Repos, cannot reorder the backlog, and cannot view query charts; upgrade those who need it to Basic); developers preferably use the access included with VS / GitHub Enterprise; assign automatically with Entra group rules; regularly downgrade idle Basic users.

4. Explain the significance of the pre-merge commit (refs/pull/{id}/merge) for build validation.

Build validation builds the “result of merging the source branch into the target branch”, which catches merge conflicts and integration problems early; when the target branch changes, the result may expire and must be rebuilt according to the policy.

5. Why call the workitems API again after a WIQL query?

WIQL returns only IDs (and links); the fields must be fetched with a bulk API (up to 200 IDs per batch), which reduces load and avoids throttling.

6. The company requires that no automation uses a PAT. Give an authentication scheme for each of three scenarios: “creating work items inside a pipeline”, “an external service reading Boards”, and “an administrator's temporary script”.

Inside a pipeline: use the job access token $(System.AccessToken) (and grant the build service identity the required permissions), or an Azure DevOps service connection with workload identity federation; external service: a service principal or managed identity to obtain an Entra token (the identity must be added to the organization and assigned an access level directly); administrator script: az login + az account get-access-token --resource 499b84ac-….

Sources and version notes

All facts were verified against official sources on 2026-11-15; prices and retirement dates follow the latest official pages
Verified 2026-11-15
TopicVerified conclusionSource (accessed 2026-11-15)
Permission states and inheritanceSeven states; within the same scope, Deny generally takes precedence over Allow; an explicit value for the same identity on a child node replaces the value inherited from the parent; Not set neither grants nor overrides; do not change the default permissions of Valid Users; Entra group changes sync within about 1 hourAbout permissions and security groups(ms.date 2026-09-18)
Default security groupsList of default groups at project and organization level; PCA manages projects, policies, processes, retention, agent pools and extensionsSame as above;Default permissions quick reference
Stakeholder capabilitiesPrivate projects: Boards part, no Repos, full Pipelines, no Test Plans, full Artifacts, project Wiki read-only, no code WikiStakeholder access quick reference(ms.date 2026-04-13)
PricesBasic: first 5 free, then $6/user/month; Basic + Test Plans $52; hosted parallel jobs $40/month; self-hosted $15/month; Artifacts tiered after 2 GiB freeAzure DevOps Services pricing;Billing overview
Parallel jobsHosted free tier for private projects: 1 job, 1 hour per run, 1,800 minutes per month, enabled automatically once billing is set up; paid jobs up to 31 hours; new organizations capped at 25; self-hosted: 1 free + 1 per VS Enterprise subscriberConfigure and pay for parallel jobs(ms.date 2026-06-19)
Public projectsRetired, can no longer be created; existing public projects become private from 2027Same as above;Public projects retirement
Group rulesThe highest of multiple rules applies; automatic re-evaluation every 24 hours; takes effect after first sign-in; does not apply to service principals and managed identities; GitHub Enterprise access equals Basic, recognized within ≤24h after sign-inAdd group rule, assign access levels(ms.date 2026-03-03)
Entra tokensResource ID 499b84ac-1321-427f-aa17-267ca6975798; token lasts about 1 hour; Azure DevOps OAuth no longer accepts new registrationsIssue Entra tokens with Azure CLI;Authenticate with Microsoft Entra ID
Global PAT retirementOfficial dates are inconsistent: the sprint 270 release notes and the PAT documentation's best-practices section say 2026-12-01, while the top of the PAT documentation says 2027-01-27; this lesson states both and notes that the latest release notes take precedenceUse personal access tokens; Azure DevOps release notes (sprint 270), verified by the course writer
REST api-versionFormat {major}.{minor}[-{stage}[.{resource-version}]]; Server 2022.1 corresponds to 7.1, vNext to 7.2REST API get started
azure-devops CLI extension1.0.11 (2026-11-10), requires Azure CLI 2.30.0+; az boards area team add and other parametersGitHub releases;az boards area team;az repos policy
Azure DevOps ServerLatest is Azure DevOps Server (25H2), RTW 2025-12-09, Patch 9 on 2026-10-13; area and iteration paths can be deleted only when no work items use themAzure DevOps Server release notes
Azure Repos limits and migrationRepositories 250 GB, 5 GB per push, SSH supports RSA only, no built-in “require signed commits” policy; GEI migrates code / PRs / branch policies but not pipelines and LFSVerified by other course writers in the same repository (see the sources page of Lesson 3 of the Git course)

Video verification notes

This lesson lists only videos verified via YouTube oEmbed (https://www.youtube.com/oembed?url=…&format=json), with titles and channels verified on 2026-11-15:

No verifiable dedicated videos were found for permission evaluation, licensing and billing, CLI/REST authentication, service hooks, and collaboration troubleshooting; the corresponding modules state “no verified video found” and provide storyboard scripts. The videos above were recorded around 2023; for the interface, prices and authentication guidance, follow this lesson.

Narration notes

The “Narration” page uses the browser's built-in Web Speech API to read the Chinese narration script (zh-CN) and English terms (en-US), without depending on the network or external scripts. This courseware cannot embed MP3 files or generate video; the narration script and storyboard can be given to a TTS or video tool to produce audio and video.

Known limitations

  • IDs, GUIDs, timestamps, organization names (contoso-lab) and emails in the expected outputs are sample values; the lab commands have not been run against a real organization, and CLI output column names may differ slightly between extension versions.
  • Azure DevOps Services is updated about every three weeks, so menu positions and wording may change; follow the official pricing page for prices.
  • Details such as the number and interval of service hook retries and PAT administration APIs are not given with specific values in this lesson; follow the official documentation.
  • The permission evaluation animation is a simplified implementation of the rules described in the official documentation; it does not cover all special rules of every namespace (such as system permissions and some administrator exceptions); the Why? result is authoritative.
  • Features such as group rules and limiting user visibility require the organization to be connected to Microsoft Entra ID; organizations created with a personal Microsoft account cannot complete these lab steps.