Category Archives:

What Happens When You Delete a User from Visual Studio Online

As of May 7 2014, Visual Studio Online has shifted to a paid model where all user accounts over the basic 5 user limit must hold a paid license in order to access and use the service.

So, what happens when you remove a user’s account from Visual Studio Online? Let’s take a look.

No, really, it’s OK

Firstly, just a word of reassurance here – your data consistency will remain even after you’ve removed the user’s account.  It might seem obvious but it is comforting to know that you’ll still have the history associated with the account.

Work Items

Your Product Backlog Items (PBIs) and other Work Items will continue to work as expected – even if the user created or updated the Work Item or has it assigned to them at the time their account is removed.

Audit trail entries that were created by this user through their activities on individual Work Items will retain full fidelity so you can trace actions by the user at any future point.

Source Control

Both Git and TFS source control repositories will behave as expected and the user’s change history of files will remain intact.

Are they really locked out?

Yes. Visual Studio Online via the web, Visual Studio and source control will not allow a deleted account to have access.  Even Git with it’s alternative credentials returns an authentication failure when trying to perform any action.

Any edge cases?

Not that we’ve seen.  Here’s some advice on things to do before you remove an account (granted some of these might not make any sense depending on how stale the account is and what it’s purpose is).

  1. Be aware there is an initial soft limit of 50 user accounts per subscription.  You can raise a support ticket to get this increased.
  2. Make sure you have alternate project administrators if the account you are deleting has previously been the only project administrator.
  3. Make sure any outstanding check-ins are either shelved or checked-in.

It’s early days for Visual Studio Online as a paid SaaS solution – it will be interesting to see how it continues to evolve now that it’s generating a revenue stream for Microsoft.

Tagged , , , ,

TFS As A Service ( – Connect to and Query Using C#

Having worked with every version of Team Foundation Server (TFS) since its inception I was keen to see what API support “” has. The good news is that (at time of blogging) the API accessibility is all there, is free and aligns with the on-premise API and client object model.

I’ve always felt the strongly-typed client object model and library is a strength of the TFS offering over many of its competitors and the classes that compose it provide some good extensibility possibilities – I’ve been on a project where all “Requirements” work item types from an MSF Agile project were exported via the API to a Word document and formatted for presentation to the customer (and we could re-run it any time!)

This past week has seen the RTM availability for a bunch of Microsoft products including Visual Studio and Team Foundation Server 2012, which means that an RTM set of the TFS Client Object Model assemblies are now available. After grabbing them I fired up Visual Studio, added in the correct references and was able to connect to our TFS Preview instance and perform some query magic.

Here’s an (incomplete) sample of how easy it is!

// Add the namespaces.  Make sure it's version!
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client; 

// some time later in your code...
// this code assumes the user who owns the current thread has previously authorised against the server
using (TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(""), new TfsClientCredentials()))
     var workItemService = tpc.GetService<WorkItemStore>();

     var queryString = "Select [State], [Title] From WorkItems Where [System.TeamProject] = @TeamProject and [Work Item Type] = @Type and [Assigned to] = @Me";

     var variables = new Dictionary()
                             {"TeamProject", "YOURPROJECT"}

     var query = new Query(workItemService, queryString, variables);
     WorkItemCollection results = query.RunQuery();

So the above is just a simple and incomplete example – but it will connect and return results for you. The TFS extensibility options are pretty wide and varied as can be seen on MSDN! I’ll post more stuff up here over time as I work through my planned use of this server (a custom team board in our office… too big perhaps, but hey…).

If you don’t have a TFSPreview account I’d recommend getting one and having a play – Microsoft has said the platform will be free through until the end of 2012 so I’d say there’s no better way to try it out than that. They are also shipping updates for the platform every 3 weeks which will be ahead of the on-premise version which will get quarterly updates (based on the TFSPreview updates). Get in and get informed.

Tagged , , , , , , , ,