How do I move an Azure DevOps project to a different organization?

I have got a project in an old org (from VSTS), that I want to move to my new one.

I can't see any options in Azure DevOps on migrating projects, or any information on the interwebs.

Anyone know how to do it?


If you just need to move repos, you can use the built in clone functions:

  1. Go to the Azure Devops source repo -> Files
  2. Click "Clone"
  3. Choose "Generate Git Credentials"

Generate GIT credentials

  1. Create the target repo in the target Azure DevOps
  2. Choose "Import a repository"
  3. Use the URL and credentials from Step 3

enter image description here

  1. Done

This is not supported today. But this feature was planned to develop: make it possible to move a Team Project between Team Project Collections


If your Azure Devops project only tracks code versions using a single Git repo, hence no boards, user stories, tasks, pipelines, etc. then you can do the following:

  1. Clone your project repo.
    • For example with Visual Studio.
    • You don't need to clone if you already have a local repo.
  2. Destroy the association with the remote.
    • For this typically, you need to open a command line prompt in the folder that contains the .git database folder, most likely the solution folder of Visual Studio and type git remote rm origin.
    • Here is an example using git bash showing the content of the solution folder, including the .git database and the *.sln Visual Studio solution file: enter image description here
  3. Open the solution with Visual Studio if not already done.
    • It should now show that you have many commits waiting to be pushed to a remote. For illustration purpose, my toy project only have 8 commits in total. enter image description here
  4. Click the up arrow and choose your new remote, say a brand new Azure DevOps project, in the organization of your choice, then push.
  5. You are now done cloning the project in another organization. If needed, then destroy the project in the old organization to complete the "move" operation.

There are 3 projects that I know of to achieve this.

A paid for option by Ops Hub - OpsHub Visual Studio Migration Utility

An open source tool that requires making changes to the work item process template - Azure DevOps Migration tools

An lastly an Unofficial but still written by Microsoft tool to create Azure DevOps project templates - Azure DevOps Demo Generator & extractor tool

With the last one (the Demo Generator) you extract the project as a template, then apply it to the new organisation. As it is a tool for demo's there is no support provided and in my experience it works for simple projects but falls over on anything complex.


Expanding on others' answers, this post regards Pipelines.

Azure DevOps API

Migrating nearly all aspects of a project across organizations is doable, but it is a lot of manual work using the Azure DevOps API. The link below shows you all the end points, variables, etc. From there you'll probably want to write a Power Shell script and do a couple test runs to a dummy Organization.

https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-6.1&viewFallbackFrom=azure-devops-rest-6.0

In App options

If you avoid the API, there is no way to migrate pipelines that preserve build or release history, but you can preserve your configurations and processes by going into your Pipelines and selecting View YAML. From here you can either take this away as notes to recreate the GUI steps in your new org/project location, or actually adopt the YAML standard in your git repository.

I do not believe there is a way to migrate pipeline variables outside of the API. However, you can move the variables to Azure Key Vault and change your pipeline settings (YAML) to reference values from key vault. This is not a large amount of effort and is a nice process improvement.

Lastly, if you have any locally installed pipeline agents for releases, you will need to run the Power Shell script for your new organization on the boxes. Very simple 5m step, but right now the Agent Pools are not sharable across organization.