How to modify an Identity Field in Azure DevOps through Logic Apps

Lopez, Oliver 0 Reputation points
2024-04-08T12:30:56.2133333+00:00

Hi,

I am using Logic Apps to send an approval email when a Azure DevOps Work Item is created. The idea is that when the user click "Approve", the Work Item is updated and the "Accepted By" field should be updated with the Identity of the user who approved the request.

However, it doesn't matter the format I use to update the field, it never works. The field is type "Identity". Whenever you type it searches the domain for users within the project and you select one.

Is there a way to update this field somehow through the Logic App?

Thank you

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,141 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,191 Reputation points Microsoft Employee
    2024-04-09T17:59:42.7033333+00:00

    Hey @Lopez, Oliver

    I went perusing through Azure DevOps - Connectors | Microsoft Learn for inclinations on updating a work item assignment. I personally don't know if the issue is with the Azure DevOps connector or the request you're creating.

    Having said that, you should be able to use Work Items - Update - REST API (Azure DevOps Work Item Tracking) | Microsoft Learn passing:

    {
      "op": "add",
      "path": "/fields/System.AssignedTo",
      "value": "new.identity@example.com"
    }
    

    as the body to update the assignment of the work item. For fields that are identity, the email of the user should suffice. Accepted By sounds like a custom field, so I would use Fields - List - REST API (Azure DevOps Work Item Tracking) | Microsoft Learn to make sure the field path of the custom field is correct. I would try this something like Postman to validate the request payload is correct. That way, if it is and the Azure DevOps connector isn't working as expected, you can at least use an HTTP connector. Although if it works in Postman, it should work in the connector. If you get any errors, feel free to drop them in a comment down below.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.