Migrating Azure Subscriptions to Organization Accounts (Including Visual Studio Online)

We started creating Azure subscriptions before organization accounts were available, but now when even Visual Studio Online supports organization accounts, we wanted to switch from Microsoft accounts. (Microsoft accounts have the obvious drawbacks: more passwords to remember and access does not go away automatically when people quit.)

The subscription owner (service account) was a Microsoft account – let us call this account1@company.se. The subscriptions were linked to a domain that I refer to here as domain1.onmicrosoft.com, and the new domain, which is synced with our Active Directory, I refer to as company.onmicrosoft.com.

Azure Co-Administrators

So here is what we had to do make the switch with co-administrators:

  1. Change the AD account name of account1@company.se to account2@company.se. Why? Because this account was synced to company.onmicrosoft.com, and there can only be one account with the same name in the same Azure Active Directory (AAD). (The Microsoft account is added in step 4 below.)
  2. Go to manage.windowsazure.com and login as account1@company.se.
  3. Create a new directory. Choose custom create. Select Use existing directory.
  4. Log in as a global administrator of the company.onmicrosoft.com domain. What happens now is that account1@company.se (the Microsoft account) is automatically added as a global administrator in company.onmicrosoft.com.
  5. Log out and log in again as account1@company.se. There should now be a new directory (company.onmicrosoft.com) visible.
  6. Go to settings, select a subscription and click Edit Directory at the bottom of the page. Change to company.onmicrosoft.com. You get a warning saying all co-administrators will be deleted. That is OK, because that is what we wish to accomplish.
  7. Add organization accounts as co-administrators as appropriate.

Azure Service Administrators

Now, we also wanted to change the service administrator from account1@company.se (Microsoft account) to account2@company.se (organization account). That is accomplished in the account portal.

  1. Go to account.windowsazure.com and log in.
  2. Select a subscription.
  3. Click Edit subscription details.
  4. Change the service administrator.

Account Administrator

I don’t know how to change the account administrator. Maybe it requires a support ticket.

Visual Studio Online

Visual Studio Online was the most difficult service. You can administer some aspects in the Azure managment portal (manage.windowsazure.com). But when you connect it to the new domain (company.onmicrosoft.com in my case), users not in that domain will loose access. Because the Microsoft accounts probably do not exist in that domain, you will have to create new users in Visual Studio Online, and because the probably have the same names as the corresponding Microsoft accounts, you must first delete these.

But beware! Before you start deleting users and switch domain, you must make sure no user has anything checked out. You might also want to delete all workspaces, because when the “new” users start Visual Studio and log in, they must create new workspaces, because the old workspaces are owned by different users. And you cannot have work folder mappings in two workspaces to the same local folder on the same computer (error: The working folder is already in use by the workspace…)

Use the following command to list all workspaces:

tf workspaces /server:<instance>.visualstudio.com\DefaultCollection /owner:*

or the following to see details on a specific computer:

tf workspaces /server:instance.visualstudio.com\DefaultCollection /computer:<computer>/owner:* /format:detailed

You can delete a workspace with the following command:

tf workspace /delete /collection:<instance>.visualstudio.com\DefaultCollection "<computer>;<user>"

Or simpler, use Team Foundation Sidekicks. In fact, I did not delete my work space before making the switch, and the only way I could delete it afterwards was to use Sidekicks.

  1. Ensure no user has anything checked out.
  2. Delete workspaces for Microsoft accounts that you plan to abandon in favour of organization account.
  3. Delete accounts in VisualStudio Online using User Management (https://<instance&gt;.visualstudio.com/_user).
  4. Go to manage.windowsazure.com and login as an administrator. Select your Visual Studio Online service and click Configure. Click the Connect button and connect to the company.onmicrosoft.com domain.
  5. MSDN subscribers must connect their Microsoft accounts with their organization accounts in the My Account section of MSDN (https://msdn.microsoft.com/subscriptions/manage/hh442900). Under Visual Studio Online they can create this link.
  6. In Visual Studio Online using User Management, add users again. This time, their organization accounts will be added. If they have MSDN, you should choose Eligible MSDN Subscriber as license.
  7. Click the cog wheel in the upper right corner in Visual Studio Online to go to the control panel. Select a project, click on your team and add team members and administrators.
  8. In Visual Studio, users must switch user by clicking Connect to Team Projects in Team Explorer and then Select Team Projects… In the bottom of the Connect to Team Foundation Server dialog, click Switch User. Enter the organization account credentials.
  9. If a user doesn’t see any code, just work items, he or she has probably a stakeholder license, not an MSDN license. They can check this by logging in to <instance>.visualstudio.com. See step 5 above. If it still doesn’t work, try changing license to basic and then back to MSDN.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.