I have a few old Visual Studio Online (VSO) accounts (dating back to TFSPreview.com days). We use them to collaborate with third parties, it was long overdue that I tidied them up; as a problem historically has been that all access to VSO has been using a Microsoft Accounts (LiveID, MSA), these are hard to police, especially if users mix personal and business ones.
The solution is to link your VSO instance to an Azure Active Directory (AAD). This means that only users listed in the AAD can connect to the VSO instance. As this AAD can be federated to an on-prem company AD it means that the VSO users can be either
- Company domain users
- MSA accounts specifically added to AAD
Either way it gives the AAD administrator an easy way to manage access to VSO. A user with a MSA, even if an administrator in VSO cannot add any unknown users to VSO. For details see MSDN. All straight forward you would think, but it I had a few issues.
The problem was I had setup my VSO accounts using a MSA in the form user@mycompany.co.uk, this was also linked to my MSDN subscription. As part of the VSO/AAD linking process I needed to add the MSA user@mycompany.co.uk to our AAD, but I could not. The AAD was setup for federation of accounts in the mycompany.com domain, so you would have thought I would be OK, but back in our on-prem AD (the one it was federated to) I had user@mycompany.co.uk as an email alias for user@mycompany.com. Thus blocked the adding of the user to AAD, hence I could got link VSO to Azure.
The answer was to
- Add another MSA account to the VSO instance, one unknown to our AD even as an alias e.g. user@live.co.uk
- Make this user the owner of the VSO instance.
- Add the user@live.co.uk MSA to the AAD directory
- Make them an Azure Subscription administrator.
- Login to the Azure portal as this MSA, once this was done the VSO could be linked to the AAD directory.
- I could then make an AAD user (user@mycompany.com) a VSO user and then the VSO owner
- The user@live.co.uk MSA could then be deleted from VSO and AAD
- I could then login to VSO as my user@mycompany.com AAD account, as opposed to the old user@mycompany.co.uk MSA account
Simple wasn’t it!
We still had one problem, and that was user@mycompany.com was showing as a basic user in VSO, if you tried to set it to MSDN eligible flipped back to basic.
The problem here was we had not associated the AAD account user@mycompany.com with the MSA account user@mycompany.co.uk in the MSDN portal (see MSDN).
Once this was done it all worked as expected, VSO picking up that my AAD account had a full MSDN subscription.