Search code examples
gitazureazure-devopstfvc

Reassigning VSTS source code repos to a different VSTS account


The situation is like this: there are two companies involved with a project. CompanyA manages a VSTS account, under which there are several source code repositories, some TFVC, some Git. The goal is to end up with the repos under a VSTS account belonging to CompanyB.

Is this possible somehow, without recreating the repositories and migrating their contents? Migrating the repositories would be a solution, but I am not asking about how to perform migration, because I would like to avoid that.

I have found a doc which might be relevant, but I don't quite understand.


Solution

  • Unless you are able to hand over the whole VSTS account, there is no way to hand over specific projects without migration (TFVC) or creating a mirror clone (Git).

    Migrating with all work items, test history etc in place is even harder.

    If you're able to migrate everything, then the process is as follows:

    • Add a AAD account from company B as guest to the AAD of company A.
    • Grant the user permissions on the VSTS account of Company A.
    • Let the user logon once to the VSTS account of Company A.
    • Assign Ownership of the account to the user from Company B.
    • Associate the VSTS account to the Azure subscription and AAD of Company B.

    That will complete the transfer process.

    There are a few catch-22 situations you may encounter (especially in adding the user from Company B if neither company supports AAD guest account). And if that's the case you can probably submit a support request to have Microsoft perform the handoff in the backend for you.