i found the solution using the TFS API:
NetworkCredential networkCredential = new NetworkCredential("username", "password", "domainName");
TeamFoundationServer tfs = new TeamFoundationServer("TFS Server Name", networkCredential);
VersionControlServer versionControl = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
Workspace[] retVal = versionControl.QueryWorkspaces(null, "username", "computername");