2,045 questions
0
votes
1
answer
72
views
Creating an Azure DevOps User Story with Powershell
I'm looping through an Azure DevOps query script to essentially create copies of work items into a new iteration. The problem I'm having is with the final Invoke-RestMethod call at the end of the ...
10
votes
4
answers
2k
views
No template with an identifier of 'xamarinandroid' could be found
Could not find a question about this, and just spent 1 day figuring this out, so as community service:
Trying to create new Pipeline in a private Azure Devops project always results in the following ...
1
vote
2
answers
441
views
Azure DevOps REST API - identity picker (query on list of users) [closed]
I'm using DevOps REST API via OAuth 2.0 to populate the fields of work item types.
For identity fields, such as System.AssignedTo, I'm having a hard time trying to figure out the best API that allows ...
0
votes
1
answer
46
views
Azure DevOps API - delete iterations
I am attempting to delete a set of iterations from a tree of iterations in Azure DevOps utilizing the API as documented here:https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/classification-...
1
vote
0
answers
26
views
Why Azure Devops Query By Wiql REST API returns entries that fail the WHERE clause?
When I POST the following query to the Azure DevOps REST API <org-url>/<project>/_apis/wit/wiql?api-version=7.1, it returns an entry that clearly fails the WHERE clause.
{
"query"...
1
vote
0
answers
104
views
Mention team in DevOps
I want mention a team in Azure devops with API
I see this link, and for users its ok How to add person in comment section in workitem programatically in c#
But for team don't work, i try this :
string ...
-1
votes
1
answer
760
views
Get Pull Request File Content DIFF using Azure Devops REST Api
I am developing a service hook for Azure Devops Pull Request created event. In this service hook i want to get the files modified in this Pull Request and get the DIFF content details about each file ...
0
votes
1
answer
121
views
Azure Unauthenticated user where no user is supposed to be recognized
I'm using the Azure REST API to trigger a pipeline from 2 different function apps. In order to do that I'm using an HttpClient and sending a POST request with a Basic token (username:password) in the ...
0
votes
1
answer
361
views
Get the Work Items associated with an Azure DevOps release
When working in Azure DevOps, specifically the release pipelines, you have this nice window on a stage showing the work items that are in this specific release apart from the mapped artifact work ...
0
votes
1
answer
335
views
Is there a way to automatically retry failed stages in an Azure DevOps YAML pipeline?
I have a multi-stage YAML pipeline, and sometimes a stage fails due to transient issues (e.g., network timeouts, flaky tests, etc.). Instead of manually re-running the stage, I want to configure an ...
0
votes
2
answers
222
views
Azure Environment Approvals with Azure Devops RestAPI
I'm trying to automate the creation of Azure DevOps environments using a pipeline and a PowerShell script. While I can create the environments successfully, I'm having trouble adding approval gates to ...
1
vote
2
answers
162
views
Trying to use PowerShell 5.1 to get completed PRs for a date range in my Azure DevOps
I'm trying to use PowerShell 5.1 to get completed PRs for a date range in Azure DevOps. I'm getting a response, but not respecting the closed date parameter. I know I can filter the list afterwards, ...
1
vote
1
answer
268
views
How to turn on GitHub Advanced Security (GHAS) for Azure DevOps for all the repositories and projects with the help of PowerShell or CLI code.?
I have multiple organizations and hundreds of projects in it. When I turn on the GitHub Advanced Security (GHAS) at organization level, it is only ON for the future projects and repos. It will be ...
1
vote
2
answers
130
views
How to trigger a middle stage in yaml pipeline in Azure Devops after another pipeline's completion?
I need to trigger a yaml stage of the pipeline after completion of another pipeline completion.
I have a setup like this: the main pipeline has
stage1 -> stage2 -> stage3 -> stage4
After ...
1
vote
1
answer
144
views
Create Pull Request on user's behalf from an Azure DevOps Pipeline
I have the following code when creating a branch/commit in a pipeline. I'm using the $(Build.RequestedFor) and $(Build.RequestedForEmail) so that when I push the commit to the repo it shows as the ...
1
vote
2
answers
1k
views
Get the commits associated with an Azure DevOps release based on previous release
When working in Azure DevOps, specifically the release pipelines, you have this nice window on a stage showing the commits that are in this specific release.
I would like to use this information ...
0
votes
1
answer
77
views
Azure DevOps - load provided Graph avatars via OAuth 2.0
I'm using Projects - List REST API to retrieve the list of DevOps projects, with their avatar
[GET] https://dev.azure.com/MY_ORGANIZATION/_apis/projects?getDefaultTeamImageUrl=true
Each returned ...
0
votes
2
answers
148
views
Download a Zip File from Azure DevOps Git Repo Using Azure DevOps SDK
I am trying to download a zip file from an Azure DevOps Git repository using the Azure DevOps SDK for .NET (dont want to use the plain REST APIs).
public async Task DownloadItemAsync(string ...
0
votes
1
answer
134
views
Pass parameter to a different-project pipeline via REST api using System.AccessToken
Project A: deploy.yml
parameters:
- name: testparam
type: string
default: "default"
steps:
- script: echo hi
Project B: pipeline.yml
jobs:
- job: CallDeploymentPipeline
...
0
votes
0
answers
36
views
Get AzureDevops release pipeline agents via automation
Is there any way to fetch the agent list of all AzureDevops RELEASE pipeline agents?
I can achieve till to fetch the definitionID but after that not able to proceed further as I am not getting correct ...
0
votes
1
answer
304
views
DataBricks API not working for Create or Update
I have this problem
{
"error_code": "BAD_REQUEST",
"message": "Remote repo not found. Please ensure that:\n1. Your remote Git repo URL is valid.\n2. Your ...
0
votes
1
answer
226
views
Unable to Fetch Data from Custom Analytics Views in Azure DevOps API
I am trying to retrieve data from a specific Analytics View in Azure DevOps using Python. I am able to list all available views, including custom shared/private views, but I cannot fetch the actual ...
0
votes
1
answer
41
views
Should REST API fields like access_token return consistent types across success and error responses?
I'm designing a REST API and want to follow best practices from guidelines like Microsoft REST API Guidelines, OpenAPI, or JSON:API.
In my current API response structure, I'm returning the same field ...
-1
votes
1
answer
1k
views
Azure Entra Id OAuth2 can't seem to get past Invalid scope error. How should i send in the scopes?
I'm trying to get OAuth access for Azure DevOps to access my workitems.
I think I have most of the beginings in place, i have a app registered in Entra Id and i have set up the API permissions like ...
0
votes
1
answer
912
views
Get info about approvals and checks for Azure DevOps environments
In order to verify that the protection for our Azure devops environment are set properly we would like to build in a scheduled automated check.
But it seems that the REST api that describes ...
0
votes
1
answer
151
views
find azureDevops agents capabilities
# Define variables
$organization = "xxx"
$project = "xxxx"
$pat = "xxxxx"
$outputCsv = "agents_applications.csv"
# Generate a unique filename for the CSV file
$...
0
votes
2
answers
418
views
How Microsoft Entra ID OAuth works for Azure DevOps?
I have created a new Azure App, but I didn't add any permissions related to Azure DevOps.
Then, I added this app to the Project Collection Administrators group in the Azure DevOps organization. I ...
0
votes
2
answers
89
views
DevOps API how to create a test point
In order to use Microsoft.TeamFoundation.TestManagement.WebApi.TestManagementHttpClientRetryHelper.AddTestResultsToTestRunAsync you need an Microsoft.TeamFoundation.TestManagement.WebApi.TestPoint. ...
0
votes
1
answer
733
views
Add a managed identity as a user to my AzureDevOps organization - so that it can access AzureDevOps resources
I have a managed identity created in Microsoft Entra. I want to give this identity access to my AzureDevOps resources so that I can call the AzureDevOps API using it.
I have followed this URL: link-...
44
votes
8
answers
32k
views
Is it possible to have a link to raw content of file in Azure DevOps
It's possible to generate a link to raw content of the file in GitHub, is it possible to do with VSTS/DevOps?
1
vote
2
answers
1k
views
Approving pipeline stage in Azure Devops via API
I am trying to approve stages of a multi-stage yaml pipeline in azure devops but my REST requests to the endpoint detailed here return an error
{
"$id": "1",
"...
1
vote
1
answer
219
views
Get All Pipeline Parameters Through Azure DevOps REST API
I am creating a desktop application with Python to execute pipelines in Azure DevOps. I've managed to execute pipelines with fields such as Org Name, Project Name, Pipeline Id, PAT and with two ...
0
votes
1
answer
90
views
AzureDevops API - create test points
is there a way to create Test Point in Azure Devops? I can find in documentation how to update existing test point - assign tester, etc... but my use case is to create a particular number of test ...
4
votes
1
answer
797
views
How to mark NuGet packages on Azure DevOps feed as deprecated to use nuget search or dotnet list package --deprecated?
In Azure DevOps Builds, checks for deprecated and vulnerable nuget packages work great using:
dotnet list "HappySolution.sln" package --deprecated --source https://api.nuget.org/v3/index....
1
vote
1
answer
1k
views
How to use a bearer token generated with client credentials flow in PowerShell to invoke DevOps REST API?
I'm working on a DevOps automation project and need to authenticate against a REST API using OAuth 2.0 client credentials flow. Specifically, I want to:
Obtain a bearer token using client credentials ...
1
vote
1
answer
691
views
What is the significance of vssps in some Azure DevOps rest API instances
I'm having some challenges performing a Get on the ADO Identities service:
https://learn.microsoft.com/en-us/rest/api/azure/devops/ims/identities/read-identities?view=azure-devops-rest-7.1&tabs=...
0
votes
1
answer
105
views
Get Root Area Path ID [Azure Devops Extension]
I am developing an extension for Azure Devops. The extensions aims to render content on the work item page depending on the work item's area path ID. I managed to retrieve the available area path IDs ...
0
votes
1
answer
483
views
Azure Devops Pipeline - how to fetch all files changed on branch without using git commands
I want to run some pytest tests on the files changed in my branch, on which the build pipeline containing all the steps is running. I have this
displayName: 'Get changed files in the ...
0
votes
1
answer
64
views
Azure devops Python API - how to check if there is already an existing commit or PR on a file?
I am building automation for people in our team to upload certain files, then after some conditions are fulfilled they can click on a create PR button to create a pull request. However we often get ...
0
votes
1
answer
327
views
Using Azure Devops Python API to create PR and add tags to it in the same call
So I want to create pull requests using the POST request endpoint, but want to add a tag to the PR along with it. I know there is a separate endpoint to add a tag to a PR, but was wondering if these ...
0
votes
1
answer
85
views
filtering reopened workitems in azure devops, using reporting revisions api
I want to find the work items that were reopened (were closed before and now are opened again)
I have used this api to get all the revisions of work items :
Reporting Work Item Revisions - Read ...
0
votes
1
answer
685
views
Log in scope for an Azure DevOps REST API SPA app
I wrote a JavaScript SPA, reading and writing work item data through Azure DevOps REST APIs. I registered the app, and tried to use MSAL lib for the app.
When I was trying to log in (calling ...
-1
votes
1
answer
102
views
How to upload an HTML file to DevOps work item using bearer token in Python?
I’m trying to upload an HTML file as an attachment to a work item in Azure DevOps using Azure DevOps REST API. I’m using Microsoft Entra ID (Azure AD) for authentication, and I’ve managed to get the ...
0
votes
1
answer
168
views
Error 400: "Bad Request" When Importing GitLab Repository into Azure DevOps via REST API
I am trying to import a GitLab repository into Azure DevOps using the REST API. However, I am encountering a 400 Bad Request error during the process. Below is the core part of the code:
python code:
...
0
votes
1
answer
83
views
az rest for azure devops only returns 203 to login
I want to authenticate to Azure DevOps using Azure CLI. I can run the following command without issues for one organization, but not for others. I am not using a Personal Access Token (PAT), but ...
0
votes
1
answer
157
views
Shell script to create a PR after completed build pipeline in Azure devops
I would like to merge the PR once the build pipeline is completed in Azure devops. Could you please guide me on how we can design and improve this process? i ma trying to get it via rest api but its ...
0
votes
1
answer
682
views
How to fetch the executed pipeline details (rawlogs/output) using API call
I want to fetch the logs generated in the successful pipeline for the particular build ID using API call in plain text or text file without using any artifacts.
How can I achieve it? What are the ways ...
0
votes
2
answers
402
views
how to open the azure devops signin screen from powershell?
I'm writing a powershell script to rotate my PAT in my devbox. Here's what I've done:
PS> .\Rotate-Pat.ps1
Here's the code in Check-PatValidity.ps1:
$env:PAT | az devops login --organization "...
0
votes
1
answer
71
views
C# - Azure API - pushes - method not allowed error
I try to create the first commit and the main branch, in c#, calling ADO api on my server
but I am not sure this can be done as I get "MethodNotAllowed" return code
PAT is full access and ...
0
votes
1
answer
1k
views
How to grant permissions to call Azure DevOps REST API using System.AccessToken?
I want to call the Azure DevOps REST API's Test Suites - Create endpoint from an Azure DevOps Release pipeline.
I am doing this from a PowerShell task and I am using System.AccessToken. When I try to ...