# Azure DevOps

## **Introduction**

This document provides a comprehensive guide for integrating Azure DevOps with Autom Mate. It covers credential setup, details about available actions, and step-by-step instructions for leveraging Autom Mate to streamline work item management and project operations.

***

## **What is Azure DevOps?**

Azure DevOps is a cloud-based DevOps service offered by Microsoft that provides a set of tools for planning, developing, testing, and delivering software. It supports agile project management, CI/CD pipelines, and collaboration for development teams, helping them ship high-quality software efficiently.

***

## **Autom Mate Integration with Azure DevOps**

The integration between Autom Mate and Azure DevOps enables users to automate project and work item management tasks. Autom Mate provides predefined actions that interact seamlessly with Azure DevOps APIs, allowing users to create, retrieve, and manage work items and projects.

***

## **Credentials**

To connect Autom Mate to Azure DevOps, credentials must be added to the Autom Mate Vault. The integration uses OAuth 2.0 authentication.

### **OAuth 2.0 Authentication**

* **Purpose**: OAuth 2.0 is a secure authentication method that allows access to Azure DevOps resources on behalf of the user.
* **Steps to Add Credential**:
  1. Navigate to the Vault and click **Add New Credential**.
  2. Fill in the required fields:
     * **Connector Name**: Enter a friendly and globally recognizable name for the connector.
     * **Authentication Type**: Select `oauth20`.
     * **Client ID**: Retrieve your Client ID from the Azure Portal's application registration page. [Learn More](https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app).
     * **Client Secret**: Retrieve your Client Secret from the Azure Portal's application registration page. [Learn More](https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app).
     * **Tenant ID**: Specify the directory tenant in GUID or friendly name format. This determines the Azure Active Directory tenant that permissions are requested from.
  3. Save the credential to complete the setup.

***

## **How to Use Actions**

### **Create Work Item**

#### **Description and Purpose**

The **Create Work Item** action allows users to create a new work item within a specified project. Additional fields can be configured through the data manager but may not be compatible with all work item types.

#### **Usage Stepper**

{% stepper %}
{% step %}
Add Azure DevOps credentials to Autom Mate’s Vault.
{% endstep %}

{% step %}
Select the **Create Work Item** action.
{% endstep %}

{% step %}
Provide the required fields: `Project ID`, `Work Item Type`, and `Title`.
{% endstep %}

{% step %}
Configure optional fields using the data manager if necessary.
{% endstep %}

{% step %}
Execute the action to create the work item.
{% endstep %}
{% endstepper %}

{% hint style="success" %}

#### **Inputs**

* **Project ID (Required)**: Specify the ID of the project where the work item will be created.
* **Work Item Type (Required)**: Specify the type of the work item (e.g., Bug, Task).
* **Title (Required)**: Enter the title of the work item.
* **Optional Fields**: Configure additional fields in the data manager as needed.
  {% endhint %}

***

### **Get Project Details**

#### **Description and Purpose**

The **Get Project Details** action retrieves detailed information about a specific project in Azure DevOps. Users can specify or select a Project ID from a dropdown menu, which lists up to 100 projects.

#### **Usage Stepper**

{% stepper %}
{% step %}
Add Azure DevOps credentials to Autom Mate’s Vault.
{% endstep %}

{% step %}
Select the **Get Project Details** action.
{% endstep %}

{% step %}
Provide the required field: `Project ID` (specify or select from the dropdown menu).
{% endstep %}

{% step %}
Configure optional fields using the data manager if necessary.
{% endstep %}

{% step %}
Execute the action to retrieve the project details.
{% endstep %}
{% endstepper %}

{% hint style="success" %}

#### **Inputs**

* **Project ID (Required)**: Specify or select a Project ID. A maximum of 100 projects will be listed in the dropdown menu.
* **Optional Fields**: Configure additional fields in the data manager as needed.
  {% endhint %}

***

### **List Projects**

#### **Description and Purpose**

The **List Projects** action retrieves a list of all projects in the organization. Users can configure optional fields using the data manager for additional customization.

#### **Usage Stepper**

{% stepper %}
{% step %}
Add Azure DevOps credentials to Autom Mate’s Vault.
{% endstep %}

{% step %}
Select the **List Projects** action.
{% endstep %}

{% step %}
Configure optional fields using the data manager if necessary.
{% endstep %}

{% step %}
Execute the action to retrieve the list of projects
{% endstep %}
{% endstepper %}

{% hint style="success" %}

#### **Inputs**

* **Optional Fields**: Configure additional fields in the data manager as needed.
  {% endhint %}

***

### **Get Work Item**

**Description and Purpose**

The **Get Work Item** action retrieves the details of a specific work item by ID. Users can configure optional fields using the data manager for additional customization.

#### **Usage Stepper**

{% stepper %}
{% step %}
Add Azure DevOps credentials to Autom Mate’s Vault.
{% endstep %}

{% step %}
Select the **Get Work Item** action.
{% endstep %}

{% step %}
Provide the required fields: `Project ID` and `Work Item ID`.
{% endstep %}

{% step %}
Configure optional fields using the data manager if necessary.
{% endstep %}

{% step %}
Execute the action to retrieve the work item details.
{% endstep %}
{% endstepper %}

{% hint style="success" %}

#### **Inputs**

* **Project ID (Required)**: Specify the ID of the project that contains the work item.
* **Work Item ID (Required)**: Specify the ID of the work item.
* **Optional Fields**: Configure additional fields in the data manager as needed.
  {% endhint %}

***

### **List Work Items**

#### **Description and Purpose**

The **List Work Items** action retrieves details of multiple work items based on their IDs. Users can configure optional fields using the data manager for additional customization.

#### **Usage Stepper**

{% stepper %}
{% step %}
Add Azure DevOps credentials to Autom Mate’s Vault.
{% endstep %}

{% step %}
Select the **List Work Items** action.
{% endstep %}

{% step %}
Provide the required fields: `Project ID` and `Work Item ID(s)`.
{% endstep %}

{% step %}
Configure optional fields using the data manager if necessary.
{% endstep %}

{% step %}
Execute the action to retrieve details of the specified work items.
{% endstep %}
{% endstepper %}

{% hint style="success" %}

#### **Inputs**

* **Project ID (Required)**: Specify the ID of the project that contains the work items.
* **Work Item ID(s) (Required)**: Specify the ID(s) of the work items.
* **Optional Fields**: Configure additional fields in the data manager as needed.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autommate.com/userguide/libraries/integration/azure-devops.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
