SDL GroupShare 2015 seemingly not working when used from command line application

When calling the following to authenticate against a GroupShare 2015 server all is fine as long as I use it from a Windows Forms app. But it fails when used as a command-line app. It just never reaches the MessageBox line. Is there a restriction when using this from a command-line app?

 

GroupShareClient groupShareClient;

groupShareClient = await GroupShareClient.AuthenticateClient("sa", "sa", new Uri("http://server2012"), GroupShareClient.AllScopes);

MessageBox.Show("connected");