I'm trying to connect to TFS on visualstudio.com through c# and am getting auth errors
TF30063: You are not authorized to access [subdomain].visualstudio.com.
Here is how I'm trying to enter the username and the password, which are 100% for sure correct, I can login through the website by copying and pasting the u/n & pass, and the account is part of the collection and projects.
var tfsServer = TfsConfigurationServerFactory.GetConfigurationServer(new Uri(server));
tfsServer.Credentials = new NetworkCredential(username, password);
tfsServer.Authenticate();