---
sourceDocument: Australia IT Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-service-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Get and update change request details in Azure DevOps pipeline

# Get and update change request details in Azure DevOps pipeline {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Get and update the change request details associated with an Azure DevOps pipeline.

## Before you begin

Ensure that you meet the following prerequisites before you perform this procedure:

* Connect, configure the Azure DevOps tool and discover existing repositories, orchestration tasks, and pipelines.
* Install the following custom extension tasks on your Azure DevOps instance.
  * ServiceNow extension to integrate Azure Pipelines with DevOps Change Velocity. For more information, see [Use the ServiceNow DevOps extension for Azure DevOps and Azure DevOps custom actions](https://www.servicenow.com/docs/1xZN23j5GCbNyKMulIHDzA#config-dev-ops-extensions-azure "Install and configure DevOps extension for Azure DevOps to send build and release notifications from your Azure pipeline to DevOps Change Velocity.").
  {#update-change-request-details-in-an-azure-devops-pipeline__ul_zxt_lns_qpb}
{#update-change-request-details-in-an-azure-devops-pipeline__ul_ary_23s_qpb}  
Role required:

* admin or sn_devops.admin in DevOps Change Velocity
* admin in Azure DevOps
{#update-change-request-details-in-an-azure-devops-pipeline__ul_vyx_jxh_5xb}

## About this task

When you update the state parameter in a change request, only the following transitions are supported:

* cancel: Change request state must be implement to move the state to cancel. reason is a mandatory input to update the state to canceled.
* closed: Change request state must be implement or post implement to move the state to close. close_code and close_notes are mandatory input to update the state to closed.
{#update-change-request-details-in-an-azure-devops-pipeline__ul_yqb_hc1_bwb}

Specify the change request state as an integer value:  
* 4 - Cancel (Value set in the sn_devops.change_request.cancel_state property)
* 3 - Closed (Value set in the sn_devops.change_request.closed_state property)
{#update-change-request-details-in-an-azure-devops-pipeline__ul_uwb_kc1_bwb}

When you update a choice field, you must specify a valid choice value that is available in the corresponding choice list. For example, the choice list values for the Close code field are successful,
successful_issues, and unsuccessful.


## Procedure

1. In the Azure DevOps console, navigate to OrganizationPipelinesJobs.
2. Select the Add Tasks icon (![Add additional tasks]()), and search for the ServiceNow extensions in the Add tasks search bar.
3. Add the following extension tasks for get and update functions based on whether you are using a server or agent job.  

   |-|-|
   | Get function | * ServiceNow DevOps Server Get Change * ServiceNow DevOps Agent Get Change {#update-change-request-details-in-an-azure-devops-pipeline__ul_rhr_xth_cbc} |
   | Update function | * ServiceNow DevOps Server Update Change * ServiceNow DevOps Agent Update Change {#update-change-request-details-in-an-azure-devops-pipeline__ul_urw_xth_cbc} |
   [ ]

   {#update-change-request-details-in-an-azure-devops-pipeline__table_zkf_vth_cbc}
4. In the task, update the following input parameters based on the function you are using.  

   |-|-|
   | Get function | * Project Name * Pipeline Name * Stage Name * Job Name * Build ID * Attempt Number * Branch Name (only for multi-branch pipeline) {#update-change-request-details-in-an-azure-devops-pipeline__ul_pyx_l21_bwb} Note: If you do not provide the change request details as input parameters, the change request number associated with the current pipeline and stage will be retrieved. Enter a reference name for the get change request task, which will be used to reference the change request number in the update task. See the following example. |
   | Update function | * Change request number whose details need to be updated. * Change request attributes to be updated as Key:Value pairs. {#update-change-request-details-in-an-azure-devops-pipeline__ul_pyx_l21_bbb} { "short_description": "Test description", "priority": "1", "start_date": "2021-02-05 08:00:00", "end_date": "2022-04-05 08:00:00", "justification": "test justification", "description": "test description", "cab_required": <true/false>, "comments": "This update for work notes is from ADO file", "work_notes": "test work notes", "assignment_group": "<SYS_ID>", "state":"<STATE_CODE>", "close_code":"<successful/successful_issues/unsuccessful>", "reason":"<As per Choice List>" } The changeRequestNumber value must be referenced using the get task reference name in the "\<task_name\>.\<changeRequestNumber\>" format. See the following example. Note: Attempt number is optional. If not specified, the latest CHG number from the current pipeline execution is retrieved. Otherwise, you can explicitly specify the attempt number without using any environment variables. |
   [ ]

   {#update-change-request-details-in-an-azure-devops-pipeline__table_ntk_j5h_cbc}
5. Save the changes.
{#update-change-request-details-in-an-azure-devops-pipeline__steps_ckq_myh_5xb}

*[\>]: and then


