WidgetETagConflictException when updating a widget in ADO dashboard

Nader Kelifa 0 Reputation points
2025-01-01T09:55:13.0433333+00:00

I am getting WidgetETagConflictException when updating a widget in ADO dashboard even though I am fetching the latest eTag and sending as PATCH request using REST API Error: {"$id":"1","innerException":null,"message":"Exception of type 'Microsoft.TeamFoundation.Dashboards.WebApi.WidgetETagConflictException' was thrown.","typeName":"Microsoft.TeamFoundatio n.Dashboards.WebApi.WidgetETagConflictException, Microsoft.TeamFoundation.Dashboards.WebApi","typeKey":"WidgetETagConflictException","errorCode":0,"eventId":3000}

This is the request $response = Invoke-RestMethod -Uri $widgetApiUrl -Method Patch -Headers $headers -ContentType "application/json" -Body $widgetPayload

$widgetPayload = @{ id = "345345345-13cd-345-3434-34" eTag = $currentETag name = "Markdown" position = @{ row = 3 column = 9 } size = @{ rowSpan = 1 columnSpan = 2 } settings = "##### MarkdownnAdd content using the markdown widget.n- Boldn- *Italic*n- Links`n- Sample update" settingsVersion = @{ major = 1 minor = 0 patch = 0 } artifactId = "" contributionId = "ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.MarkdownWidget" typeId = "Microsoft.VisualStudioOnline.Dashboards.MarkdownWidget" configurationContributionId = "ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.MarkdownWidget.Configuration" configurationContributionRelativeId = "Microsoft.VisualStudioOnline.Dashboards.MarkdownWidget.Configuration" isEnabled = $true contentUri = $null isNameConfigurable = $false loadingImageUrl = "https://dev.azure.com/annata/_static/Widgets/markdownLoading.png" lightboxOptions = @{ width = 600 height = 500 resizable = $true } } | ConvertTo-Json -Depth 10

Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. VarunTha 14,850 Reputation points Microsoft External Staff Moderator
    2025-01-01T21:25:07.26+00:00

    Hi Nader Kelifa,
    Thank you for reaching out to us on the Microsoft Q&A forum.

    Azure DevOps is currently not supported in the Q&A forums.

    I recommend initiating a new discussion through the Developer Community

    Moderators are readily available there to assist you and provide guidance.

    Please don't forget to Accept answer and close this thread.

    1 person found this answer helpful.
    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.