Aller au contenu
EN English versionDemander une démo

Use Azure DevOps Repos for branches and pull requests

For a project owner. Procedure connector.scm.azure-repos, version 1, reviewed 2026-11-20 against the vendor’s own pages. It applies to the connector type scm/azure-repos.

It ships with the platform. In the console it opens with How to set this up, beside the form that adds the connector and on the connector’s settings.

Addresses are written <api_url>, <public_url> and <org> here: the console shows the same text with your deployment’s own.

  • An Azure DevOps organisation (Azure DevOps Services) or an Azure DevOps Server 2022 collection, a Git repository the agents change, and an account dedicated to Tranibor.
  • Two credentials, not one. The connector’s own (pat, or a service principal) reads and writes pull requests and stays on the platform. Azure DevOps cannot make a short-lived, repository-scoped credential, so the platform makes none: a run is given run_token, or nothing. Create a second personal access token, for a second account if you can, scoped to Code: Read & write only. Without run_token, runs cannot clone or push, and the connector says why.
  • The platform’s shared webhook secret (TRANIBOR_GENERIC_WEBHOOK_SECRET), held by whoever operates Tranibor, if you want pull request events. A service hook does not sign its deliveries.
  1. The credential. A personal access token of the dedicated account (works on the Services and on Server), scopes Code: Read & write, Code: Status, Build: Read and Project and Team: Read. Or, on the Services only, a Microsoft Entra service principal added to the organisation and to the project’s Contributors.
  2. The run token. A second personal access token, scope Code: Read & write only.
  3. Branch policies on the target branch (Repos, Branches, the branch’s Branch policies): add a Build validation policy for your pipeline. This is where the pull request’s checks come from: the platform reads the Build and Status policies of the pull request, and Azure refuses to complete it while they are not met. Tranibor never bypasses a policy and never sets auto-complete.
  4. Service hooks (optional). Project settings, Service hooks, Create subscription, Web Hooks: one each for Pull request created and Pull request updated. URL: <api_url>/api/v1/webhooks/azure-devops; basic authentication password: the platform’s shared webhook secret. This path has not been exercised against a live organisation from this repository.

On the repository, for the dedicated account: Read, Contribute, Create branch, Contribute to pull requests. Bypass policies when completing pull requests must be left denied. A reviewer is asked by sign-in name or e-mail, resolved through the organisation’s identities.

What a merge means here. The platform completes the pull request at the commit its guarantees judged (lastMergeSourceCommit): if someone pushed meanwhile, nothing is completed and the work item is judged again. Completion is asynchronous on Azure’s side; the platform waits a few seconds and, if it is still queued, a replay finds it done.

  1. Project settings, Connectors, SCM, type Azure DevOps Repos.
  2. base_url, project, repository, default_branch, and merge_strategy if your repository forbids squash. auth: pat (the default) or entra, with tenant_id and client_id.
  3. pat (or client_secret) and run_token: in the password fields (sealed, shown once).
  4. The pull request’s CI is read from its Build policy and from the builds of its branch; add a CI connector of type Azure Pipelines on the same team project to queue runs and read their logs.

Press Test: the connector reads the repository and answers ok with its default branch. Then start a run: a branch is pushed with the run token, a pull request opens, and its checks appear once the Build policy has queued the pipeline.

  • 401 or a sign-in page (203): a wrong, expired or revoked token, or a service principal that is not a member of the organisation.
  • 403 on the pull request: the account lacks Contribute to pull requests; on a push, Contribute.
  • 404 on the repository: wrong project or repository, or the account is not in the project.
  • scm/azure-repos mints no token: set run_token on the connector.
  • Completion refused with a policy message: a branch policy is not met yet (a required build, a minimum number of reviewers). The platform does not bypass it; the gates wait or fail as for any other forge.
  • A build with warnings (partiallySucceeded) holds the gates back: that is the default. Set partially_succeeded: neutral only if your pipelines use warnings for things that are not failures.
  • A timeout: the egress allowlist must open dev.azure.com (or your Server), vssps.dev.azure.com and, for a service principal, login.microsoftonline.com.
Field What to put in it
auth pat (the default) for a personal access token; entra for a Microsoft Entra service principal, Azure DevOps Services only
base_url https://dev.azure.com/<organisation>, or the collection of an Azure DevOps Server 2022 (https://<server>/<path>/<collection>)
client_id entra only: the service principal’s application (client) id
client_secret the service principal’s client secret, typed once (auth: entra)
default_branch the branch pull requests target (default main)
delete_source_branch delete the work branch when the pull request is completed (default off)
merge_strategy how a pull request is completed: squash (the default), noFastForward, rebase or rebaseMerge
partially_succeeded how a build that partially succeeded counts for the gates: failure (the default) or neutral
pat the connector’s personal access token, typed once (auth: pat)
project the Azure DevOps team project
repository the Azure Repos Git repository, by name or id
run_token a second, narrower personal access token that runs clone and push with, typed once
tenant_id entra only: the Entra tenant (directory) id

Hosts the platform must be allowed to reach:

  • dev.azure.com, or your Azure DevOps Server host
  • vssps.dev.azure.com (reviewers are looked up there)
  • login.microsoftonline.com (service principal)