web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Azure Devops Connector...
Power Automate
Unanswered

Azure Devops Connector - Create Work Item for Unassigned

(0) ShareShare
ReportReport
Posted on by 12

Hello,

 

My creating a flow which grabs values off of a SharePoint (coming from PowerApps) and creating an work item in Azure DevOps. When I use "Create a work item (Azure DevOps)". Even though I leave the "Assigned To" (under Show Advanced Options) it assigns the task to me.

Gone through this thread: Solved: Re: Azure Devops Connector - Create Work Item for ... - Power Platform Community (microsoft.com)

I have to added "Send a HTTP request to Azure DevOps" after "Create a work item (Azure DevOps)" with the following:
Relative URI: {Project name}/_apis/wit/workitems/$issue?api-version=7.1-preview.3
Headers: Content-Type: application/json-patch+json
Body:
{
"op":"add",
"path":"/fields/System.AssignedTo",
"from":null,
"value":""
}

The error I get is:

"status"400,
  "message""You must pass a valid patch document in the body of the request.
Details: {\"$id\":\"1\",\"innerException\":null,\"message\":\"You must pass a valid patch document in the body of the request.\",\"typeName\":\"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common\",\"typeKey\":\"VssPropertyValidationException\",\"errorCode\":0,\"eventId\":3000}"
,
  "error": {
    "message""You must pass a valid patch document in the body of the request.\
Details: {\"$id\":\"1\",\"innerException\":null,\"message\":\"You must pass a valid patch document in the body of the request.\",\"typeName\":\"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common\",\"typeKey\":\"VssPropertyValidationException\",\"errorCode\":0,\"eventId\":3000}"
  },
  "source""vsts-ce.azconn-ce-001.p.azurewebsites.net"
}



I want to create a work item with the following:
Type: Issue
Description field should have the following data from SharePoint: (Priority, Created By, Email)
Link URL: URL column from SharePoint
Assigned To: null
State: New

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at

    Hi @mnshah,

     

    The body seems to be missing the square brackets. Also it looks like you haven't included a Title for your work item. Afaik that property is is required to be able to save a new work item.

     

    Can you try the below as the setup with that Body payload?

     

    URI

     

    @{variables('Project')}/_apis/wit/workitems/$Issue?api-version=7.1-preview.3

     

     

    Headers

     

    {
     "Content-Type": "application/json-patch+json"
    }

     

     

    Body

     

    [
     {
     "op": "add",
     "path": "/fields/System.Title",
     "from": null,
     "value": "Sample Issue"
     },
     {
     "op": "add",
     "path": "/fields/System.AssignedTo",
     "from": null,
     "value": ""
     }
    ]

     

     

    titlerequired.png

  • mnshah Profile Picture
    12 on at

    This is what I have now:
    [
    {
    "op": "add",
    "path": "/fields/System.Title",
    "from": null,
    "value": "sample"
    },
    {
    "op": "add",
    "path": "/fields/System.AssignedTo",
    "from": null,
    "value": ""
    },
    {
    "op": "add",
    "path": "/fields/System.Description",
    "from": null,
    "value": "Description: unassigned"
    },
    {
    "op": "add",
    "path": "/fields/System.Link URL",
    "from": null,
    "value": "bi assigned"
    }
    ]

    and the error message now:

    {
      "status"400,
      "message""You must pass a valid patch document in the body of the request.
    Details: {\"$id\":\"1\",\"innerException\":null,\"message\":\"You must pass a valid patch document in the body of the request.\",\"typeName\":\"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common\",\"typeKey\":\"VssPropertyValidationException\",\"errorCode\":0,
      "error": {
        "message""You must pass a valid patch document in the body of the request.
    Details: {\"$id\":\"1\",\"innerException\":null,\"message\":\"You must pass a valid patch document in the body of the request.\",\"typeName\":\"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common\",\"typeKey\":\"VssPropertyValidationException\",\"errorCode\":0,\
      },
      "source""vsts-ce.azconn-ce-001.p.azurewebsites.net"
    }

    Looks like its asking ID to be mentioned. But that's autogenerated right?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard