> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure DevOps

> Reference for the Tracecat Azure DevOps integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Add work item comment

Action ID: `tools.azure_devops.add_work_item_comment`

Add a comment to a work item.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="text" type="string" required>
  Comment text (HTML supported).
</ParamField>

<ParamField path="work_item_id" type="integer" required>
  Work item ID.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

## Create pull request comment thread

Action ID: `tools.azure_devops.create_pull_request_thread`

Create a comment thread on a pull request.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-request-threads/create?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-request-threads/create?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="comments" type="array[object]" required>
  Comments in the thread, each as `&#123;"content": "...", "commentType": "text"&#125;`.
</ParamField>

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="pull_request_id" type="integer" required>
  Pull request ID.
</ParamField>

<ParamField path="repository_id" type="string" required>
  Repository ID or name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="status" type="string | null">
  Thread status. One of `active`, `fixed`, `wontFix`, `closed`, `byDesign`, `pending`.

  Default: `null`.
</ParamField>

<ParamField path="thread_context" type="object | null">
  File/line context, e.g. `&#123;"filePath": "/src/app.py", "rightFileStart": &#123;"line": 1, "offset": 1&#125;, "rightFileEnd": &#123;"line": 1, "offset": 1&#125;&#125;`.

  Default: `null`.
</ParamField>

## Create work item

Action ID: `tools.azure_devops.create_work_item`

Create a work item of the given type (for example `Bug` or `Task`) from a mapping of field reference names to values.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/create?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/create?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="fields" type="object" required>
  Field reference names mapped to values, e.g. `&#123;"System.Title": "Investigate alert", "System.Description": "..."&#125;`.
</ParamField>

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="type" type="string" required>
  Work item type name (e.g. `Bug`, `Task`, `User Story`).
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="bypass_rules" type="boolean | null">
  Bypass work item type rules.

  Default: `null`.
</ParamField>

<ParamField path="expand" type="string | null">
  Expand parameters for work item attributes. One of `none`, `relations`, `fields`, `links`, `all`.

  Default: `null`.
</ParamField>

<ParamField path="suppress_notifications" type="boolean | null">
  Do not fire notifications for this change.

  Default: `null`.
</ParamField>

<ParamField path="validate_only" type="boolean | null">
  Validate the changes without saving the work item.

  Default: `null`.
</ParamField>

## Get Advanced Security alert

Action ID: `tools.azure_devops.get_alert`

Get a GitHub Advanced Security for Azure DevOps alert by ID.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/advancedsecurity/alerts/get?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/advancedsecurity/alerts/get?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="alert_id" type="integer" required>
  Alert ID.
</ParamField>

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="repository_id" type="string" required>
  Repository ID or name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://advsec.dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="ref" type="string | null">
  Branch ref the alert is on (e.g. `refs/heads/main`).

  Default: `null`.
</ParamField>

## Get pipeline run

Action ID: `tools.azure_devops.get_pipeline_run`

Get a pipeline run by ID.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/get?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/get?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="pipeline_id" type="integer" required>
  Pipeline ID.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="run_id" type="integer" required>
  Run ID.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

## Get pull request

Action ID: `tools.azure_devops.get_pull_request`

Get a pull request by ID.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-request?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-request?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="pull_request_id" type="integer" required>
  Pull request ID.
</ParamField>

<ParamField path="repository_id" type="string" required>
  Repository ID or name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="include_commits" type="boolean | null">
  Include commits associated with the pull request.

  Default: `null`.
</ParamField>

<ParamField path="include_work_item_refs" type="boolean | null">
  Include linked work item references.

  Default: `null`.
</ParamField>

<ParamField path="max_comment_length" type="integer | null">
  Not used.

  Default: `null`.
</ParamField>

## Get repository

Action ID: `tools.azure_devops.get_repository`

Get a Git repository by ID or name.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/get-repository?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/get-repository?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="repository_id" type="string" required>
  Repository ID or name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

## Get work item

Action ID: `tools.azure_devops.get_work_item`

Get a single work item by ID.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="id" type="integer" required>
  Work item ID.
</ParamField>

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="as_of" type="string | null">
  Return the work item as of this UTC date time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="expand" type="string | null">
  Expand parameters for work item attributes. One of `none`, `relations`, `fields`, `links`, `all`.

  Default: `null`.
</ParamField>

<ParamField path="fields" type="string | null">
  Comma-separated list of field reference names to return. Cannot be combined with `expand`.

  Default: `null`.
</ParamField>

## List Advanced Security alerts

Action ID: `tools.azure_devops.list_alerts`

List GitHub Advanced Security for Azure DevOps alerts (secret, dependency, code scanning) for a repository. Returns one page; pass `continuation_token` to fetch the next page.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/advancedsecurity/alerts/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/advancedsecurity/alerts/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="repository_id" type="string" required>
  Repository ID or name.
</ParamField>

<ParamField path="alert_type" type="string | null">
  Alert type. One of `unknown`, `dependency`, `secret`, `code`, `license`.

  Default: `null`.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://advsec.dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="confidence_levels" type="string | null">
  Comma-separated confidence levels (`high`, `other`).

  Default: `null`.
</ParamField>

<ParamField path="continuation_token" type="string | null">
  Continuation token from the previous page.

  Default: `null`.
</ParamField>

<ParamField path="from_date" type="string | null">
  Only alerts first seen after this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="is_triaged" type="boolean | null">
  Filter by triage status.

  Default: `null`.
</ParamField>

<ParamField path="keywords" type="string | null">
  Keyword filter on title, rule, or dependency.

  Default: `null`.
</ParamField>

<ParamField path="modified_since" type="string | null">
  Only alerts modified after this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="only_default_branch" type="boolean | null">
  Only alerts on the default branch.

  Default: `null`.
</ParamField>

<ParamField path="order_by" type="string | null">
  Sort order, e.g. `severity`, `firstSeen`, `lastSeen`, `id`.

  Default: `null`.
</ParamField>

<ParamField path="ref" type="string | null">
  Filter by branch ref (e.g. `refs/heads/main`).

  Default: `null`.
</ParamField>

<ParamField path="rule_id" type="string | null">
  Filter by rule ID.

  Default: `null`.
</ParamField>

<ParamField path="rule_name" type="string | null">
  Filter by rule name.

  Default: `null`.
</ParamField>

<ParamField path="severities" type="string | null">
  Comma-separated severities (e.g. `critical,high`).

  Default: `null`.
</ParamField>

<ParamField path="states" type="string | null">
  Comma-separated states (e.g. `active`, `dismissed`, `fixed`, `autoDismissed`).

  Default: `null`.
</ParamField>

<ParamField path="to_date" type="string | null">
  Only alerts first seen before this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="tool_name" type="string | null">
  Filter by tool name.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of alerts to return.

  Default: `null`.
</ParamField>

<ParamField path="validity" type="string | null">
  Comma-separated secret validity statuses.

  Default: `null`.
</ParamField>

## List builds

Action ID: `tools.azure_devops.list_builds`

List builds in a project matching optional filters. Returns one page; pass `continuation_token` to fetch the next page.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="branch_name" type="string | null">
  Filter by branch ref (e.g. `refs/heads/main`).

  Default: `null`.
</ParamField>

<ParamField path="build_ids" type="string | null">
  Comma-separated list of build IDs.

  Default: `null`.
</ParamField>

<ParamField path="build_number" type="string | null">
  Filter by build number (supports trailing `*` wildcard).

  Default: `null`.
</ParamField>

<ParamField path="continuation_token" type="string | null">
  Continuation token from the previous page.

  Default: `null`.
</ParamField>

<ParamField path="definitions" type="string | null">
  Comma-separated list of definition IDs.

  Default: `null`.
</ParamField>

<ParamField path="max_builds_per_definition" type="integer | null">
  Maximum number of builds to return per definition.

  Default: `null`.
</ParamField>

<ParamField path="max_time" type="string | null">
  Only builds finished/started before this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="min_time" type="string | null">
  Only builds finished/started after this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="query_order" type="string | null">
  Result order (e.g. `finishTimeDescending`, `queueTimeDescending`, `startTimeDescending`).

  Default: `null`.
</ParamField>

<ParamField path="reason_filter" type="string | null">
  Filter by build reason (e.g. `manual`, `individualCI`, `schedule`, `pullRequest`).

  Default: `null`.
</ParamField>

<ParamField path="repository_id" type="string | null">
  Filter by repository ID.

  Default: `null`.
</ParamField>

<ParamField path="repository_type" type="string | null">
  Filter by repository type.

  Default: `null`.
</ParamField>

<ParamField path="requested_for" type="string | null">
  Filter by the user who requested the build.

  Default: `null`.
</ParamField>

<ParamField path="result_filter" type="string | null">
  Filter by result (e.g. `succeeded`, `partiallySucceeded`, `failed`, `canceled`).

  Default: `null`.
</ParamField>

<ParamField path="status_filter" type="string | null">
  Filter by status (e.g. `inProgress`, `completed`, `cancelling`, `postponed`, `notStarted`, `all`).

  Default: `null`.
</ParamField>

<ParamField path="tag_filters" type="string | null">
  Comma-separated list of tags.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of builds to return.

  Default: `null`.
</ParamField>

## List pipeline runs

Action ID: `tools.azure_devops.list_pipeline_runs`

List the top 10000 runs for a pipeline.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="pipeline_id" type="integer" required>
  Pipeline ID.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

## List pipelines

Action ID: `tools.azure_devops.list_pipelines`

List pipelines in a project. Returns one page; pass `continuation_token` to fetch the next page.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="continuation_token" type="string | null">
  Continuation token from the previous page.

  Default: `null`.
</ParamField>

<ParamField path="order_by" type="string | null">
  Sort order, e.g. `name asc`.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of pipelines to return.

  Default: `null`.
</ParamField>

## List projects

Action ID: `tools.azure_devops.list_projects`

List projects in an Azure DevOps organization. Returns one page; pass `continuation_token` to fetch the next page.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="continuation_token" type="integer | null">
  Continuation token (number of projects already fetched) from the previous page.

  Default: `null`.
</ParamField>

<ParamField path="get_default_team_image_url" type="boolean | null">
  Include the default team image URL.

  Default: `null`.
</ParamField>

<ParamField path="skip" type="integer | null">
  Number of projects to skip.

  Default: `null`.
</ParamField>

<ParamField path="state_filter" type="string | null">
  Filter on team project state. One of `all`, `createPending`, `deleted`, `deleting`, `new`, `unchanged`, `wellFormed`.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of projects to return.

  Default: `null`.
</ParamField>

## List pull requests

Action ID: `tools.azure_devops.list_pull_requests`

List pull requests in a repository matching optional search criteria.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-requests?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-requests?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="repository_id" type="string" required>
  Repository ID or name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="creator_id" type="string | null">
  Only pull requests created by this user ID.

  Default: `null`.
</ParamField>

<ParamField path="include_links" type="boolean | null">
  Include reference links.

  Default: `null`.
</ParamField>

<ParamField path="max_time" type="string | null">
  Only pull requests created or closed before this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="min_time" type="string | null">
  Only pull requests created or closed after this time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="query_time_range_type" type="string | null">
  Which time to filter on with `min_time`/`max_time`. One of `created`, `closed`.

  Default: `null`.
</ParamField>

<ParamField path="reviewer_id" type="string | null">
  Only pull requests with this reviewer user ID.

  Default: `null`.
</ParamField>

<ParamField path="skip" type="integer | null">
  Number of pull requests to skip.

  Default: `null`.
</ParamField>

<ParamField path="source_ref_name" type="string | null">
  Only pull requests from this source branch (e.g. `refs/heads/feature`).

  Default: `null`.
</ParamField>

<ParamField path="status" type="string | null">
  Pull request status. One of `active`, `abandoned`, `completed`, `all`, `notSet`.

  Default: `null`.
</ParamField>

<ParamField path="target_ref_name" type="string | null">
  Only pull requests into this target branch (e.g. `refs/heads/main`).

  Default: `null`.
</ParamField>

<ParamField path="title" type="string | null">
  Only pull requests whose title contains this text.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of pull requests to return.

  Default: `null`.
</ParamField>

## List repositories

Action ID: `tools.azure_devops.list_repositories`

List Git repositories in a project.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="include_all_urls" type="boolean | null">
  Include all remote URLs.

  Default: `null`.
</ParamField>

<ParamField path="include_hidden" type="boolean | null">
  Include hidden repositories.

  Default: `null`.
</ParamField>

<ParamField path="include_links" type="boolean | null">
  Include reference links.

  Default: `null`.
</ParamField>

## List teams

Action ID: `tools.azure_devops.list_teams`

List teams in a project.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get-teams?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get-teams?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="expand_identity" type="boolean | null">
  Expand identity information in the result.

  Default: `null`.
</ParamField>

<ParamField path="mine" type="boolean | null">
  Return only teams the authenticated user is a member of.

  Default: `null`.
</ParamField>

<ParamField path="skip" type="integer | null">
  Number of teams to skip.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of teams to return.

  Default: `null`.
</ParamField>

## List work item comments

Action ID: `tools.azure_devops.list_work_item_comments`

List comments on a work item. Returns one page; pass `continuation_token` to fetch the next page.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/comments/get-comments?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/comments/get-comments?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="work_item_id" type="integer" required>
  Work item ID.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="continuation_token" type="string | null">
  Continuation token from the previous page.

  Default: `null`.
</ParamField>

<ParamField path="expand" type="string | null">
  Additional data to include. One of `none`, `reactions`, `renderedText`, `renderedTextOnly`, `all`.

  Default: `null`.
</ParamField>

<ParamField path="include_deleted" type="boolean | null">
  Include deleted comments.

  Default: `null`.
</ParamField>

<ParamField path="order" type="string | null">
  Order of comments. One of `asc`, `desc`.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of comments to return.

  Default: `null`.
</ParamField>

## List work items

Action ID: `tools.azure_devops.list_work_items`

Get a batch of work items by IDs (maximum 200).

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/list?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="ids" type="string" required>
  Comma-separated list of work item IDs (maximum 200).
</ParamField>

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="as_of" type="string | null">
  Return the work items as of this UTC date time (ISO 8601).

  Default: `null`.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="error_policy" type="string | null">
  Behavior when a work item is not found. One of `fail`, `omit`.

  Default: `null`.
</ParamField>

<ParamField path="expand" type="string | null">
  Expand parameters for work item attributes. One of `none`, `relations`, `fields`, `links`, `all`.

  Default: `null`.
</ParamField>

<ParamField path="fields" type="string | null">
  Comma-separated list of field reference names to return. Cannot be combined with `expand`.

  Default: `null`.
</ParamField>

## Query work items (WIQL)

Action ID: `tools.azure_devops.query_work_items`

Run a WIQL query and return matching work item references.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query-by-wiql?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query-by-wiql?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="query" type="string" required>
  WIQL query text, e.g. `SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active'`.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="team" type="string | null">
  Team ID or name to scope the query to.

  Default: `null`.
</ParamField>

<ParamField path="time_precision" type="boolean | null">
  Use time precision in date comparisons.

  Default: `null`.
</ParamField>

<ParamField path="top" type="integer | null">
  Maximum number of results to return.

  Default: `null`.
</ParamField>

## Run pipeline

Action ID: `tools.azure_devops.run_pipeline`

Run a YAML pipeline, optionally overriding the branch, template parameters, and variables.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run-pipeline?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run-pipeline?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="pipeline_id" type="integer" required>
  Pipeline ID.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="pipeline_version" type="integer | null">
  Pipeline version to run.

  Default: `null`.
</ParamField>

<ParamField path="preview_run" type="boolean | null">
  Preview the final YAML without running the pipeline.

  Default: `null`.
</ParamField>

<ParamField path="resources" type="object | null">
  Run resources, e.g. `&#123;"repositories": &#123;"self": &#123;"refName": "refs/heads/main"&#125;&#125;&#125;` to pick the branch.

  Default: `null`.
</ParamField>

<ParamField path="stages_to_skip" type="array[string] | null">
  Stage names to skip.

  Default: `null`.
</ParamField>

<ParamField path="template_parameters" type="object | null">
  Runtime template parameter values.

  Default: `null`.
</ParamField>

<ParamField path="variables" type="object | null">
  Variable overrides, e.g. `&#123;"env": &#123;"value": "prod"&#125;&#125;`.

  Default: `null`.
</ParamField>

<ParamField path="yaml_override" type="string | null">
  YAML to use instead of the pipeline's YAML (preview runs only).

  Default: `null`.
</ParamField>

## Update work item

Action ID: `tools.azure_devops.update_work_item`

Update fields on an existing work item from a mapping of field reference names to values.

Reference: [https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update?view=azure-devops-rest-7.2)

### Secrets

Optional secrets:

* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_USER_TOKEN`.
* `azure_devops_oauth`: OAuth token `AZURE_DEVOPS_SERVICE_TOKEN`.

### Input fields

<ParamField path="fields" type="object" required>
  Field reference names mapped to new values, e.g. `&#123;"System.State": "Closed"&#125;`.
</ParamField>

<ParamField path="id" type="integer" required>
  Work item ID.
</ParamField>

<ParamField path="organization" type="string" required>
  Azure DevOps organization name.
</ParamField>

<ParamField path="project" type="string" required>
  Project ID or project name.
</ParamField>

<ParamField path="base_url" type="string | null">
  Azure DevOps base URL. Defaults to `https://dev.azure.com` (Azure DevOps Services). For Azure DevOps Server, set this to the collection URL.

  Default: `null`.
</ParamField>

<ParamField path="bypass_rules" type="boolean | null">
  Bypass work item type rules.

  Default: `null`.
</ParamField>

<ParamField path="expand" type="string | null">
  Expand parameters for work item attributes. One of `none`, `relations`, `fields`, `links`, `all`.

  Default: `null`.
</ParamField>

<ParamField path="suppress_notifications" type="boolean | null">
  Do not fire notifications for this change.

  Default: `null`.
</ParamField>

<ParamField path="validate_only" type="boolean | null">
  Validate the changes without saving the work item.

  Default: `null`.
</ParamField>
