I am attempting to run a WIQL query by sending the query in the Send HTTP Request to Azure DevOps as outlined in this issue https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Create-Update-Parameterized-Queries-in-Azure-DevOps-with/ba-p/306106
However, when I attempt to send the query with a POST, I get the result "You must pass a query object in the body of the request." I do have a query in the body of the request. Does a WIQL query have to exist in Azure DevOps in order to call it? According to the screenshots in the link above, the relative uri is "{project}/_apis/wit/queries/My Queries/{Name of Query in JSON Body of request}?api-version=5.0". My relative uri is "{project}/_apis/wit/wiql?api-version=5.0". I have tried switching to the "queries/My Queries" uri as in the screenshot in the linked issue but I get the error "the query does not exist or you do not have permissions for it". The query doesn't exist, I am attempting to run it but from the screenshots in the link, it appears they are pointing to the My Queries of Azure and I would assume his query must be there or would get the same resulting error as I did? I have switched between api versions 5.0 & 5.1 and get the same error. Switching to 6.0 gets me an Unauthorized error. I have also switched between a POST and GET with the same error and when I try using PATCH as in the screenshots in the link, I get
TF400813: The user '27313870-5aa3-6c6c-a627-e8384e26de1a' is not authorized to access this resource.
Here is screenshot of my Send HTTP request to Azure DevOps:
Do I need to pass authentication like a PAT token in the headers? What am I missing here to get this HTTP call with a WIQL query to work? Thanks so much for any assistance. It is greatly appreciated.