I've been using TeamProjectPicker with different version of TFS Object Model, but since Visual Studio/Team Explorer 2017. It's not working with VSTS specially when using Azure Active Directory account to connect with VSTS. For on-prem TFS with on-prem active directory accounts it works fine.
If I would use TFS Object Model 2015 it works fine and connect to VSTS without any problem. I'm working on a product/application which picks the installed version of Visual Studio and uses the Object Model of the same VS/TE by using dependency injection. Means if I install my application on machine having Visual Studio/Team Explorer 2015, my application will start using TFS Object Model 2015.
var tfsPp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false);
DialogResult dialogResult = tfsPp.ShowDialog();
If there's limitation of TeamProjectPicker (TFS OM 2017) with VSTS, I'm ready to change the dialog window. I've been looking VS Services Client Lbrary but could find any dialog window. If I can have connection dialog window that's shown in Team Explorer that would be acceptable.
Seems it's permission issue, just as Mike mentioned you may need some impersonation here.
Based on the error messages you can refer below articles to troubleshoot them:
TF31003: Your user account does not have permission to connect to
the Team Foundation Server {0}
How To Fix TF30063 Error - You Are Not Authorized To Access Team
Foundation Service Error
TFS API Part 29 – TFS Impersonation
UPDATE:
Just try to install the Nuget Package Microsoft.TeamFoundationServer.ExtendedClient for your project.
I tested on my side, everything works as expected with the VS 2017 installed only.
Related
Visual Studio 2015
Visual Studio 2013
Until recently used TFS for source control with Microsoft live id with my yahoo email.
Recent transition from TFS to VSTS.
Couple weeks ago devops switched my VSTS account to use company email instead of yahoo email.
After that in VS I couldn't use source control anymore,
was getting error: "TF30063: You are not authorized to access usga.visualstudio.com\DefaultCollection."
and not being able to bind to source control.
Devops removed my company-email-account and reactivated my yahoo-email-account
and source control in VS started to work again, and with VSTS now.
I have not used Visual Studio for a week or so.
Today I discovered that:
My solutions lost Source Control Bindings.
I can Not bind my solutions to Source Control Again in Visual Studio.
When I re-bind it tells me that status is 'invalid'.
I do Not get any other errors.
Happens for all solutions that used to work fine with source control.
I seem to have access to www.visualstudio.com -> mycompany.visualstudio.com
and can see my projects there.
Please help me to undestand what is going on and rebind.
Many thanks
This should be a cache related issue, try to delete VS and TFS cache and restart VS.
Also try to remove your account info which stored in Credential Manager (Control Panel-All Control Panel Items-Credential Manager-Windows Manager)
Then reconnect to VSTS in Visual Studio use your personal account, make sure selected the used workspace, get latest; or directly delete the old workspace, create a new one.
My issue was resolved the following way:
1. when I've started to use TFS four years ago, I've created Microsoft Live Id account using my Personal email
this year when our devops were switching us from TFS to VSTS
they have tried to enforce rule of everybody to use their Office email for MS Live Id account. So they have created new account for me with Office email
Then I have described issues
Problem was resolved by switching me back to using original MS account with my Personal email.
And
I had to delete existing workspaces in Visual Studio 2015
and create new ones for my solutions to rebind code to VSTS.
For some reason I had to repeat this process few times.
Hope it helps
We are trying to setup TFS for our project installed in a Windows Server. All the collection(s) and projects are already created in TFS but while connecting through Visual Studio 2015 Team Explorer we are getting the below error in mapping section:
TF30063: You are not authorized to access xx.xxx.xxx.xx\ABCDEFGH.
While the same user is able to connect the TFS Collection from IE/Chrome.
Have you ever login the VS Team Explorer with other accounts? Can you connect to the TFS on another client machine?
Anyway, please try below ways to narrow down the issue:
Log out of Visual Studio Online from all browsers and VS.
Remove the existing credential from credential manager(Control panel > Credential manager, which contained the previous password)
Clear cache from C:\Users\ [your username]
\AppData\Local\Microsoft\Team Foundation{version}\Cache password.)
Run "devenv /resetuserdata" to clear your logon for Visual Studio.
Let it finish, it may take a while.
Launch Visual Studio, connect to the TFS project again with your
account.
You can also reference this similar thread: Error TF30063: You are not authorized to access ... \DefaultCollection
Suddenly all my previous and current TFS tasks are not seen when I use Visual Studio 2015.
If I use visual studio 2012 or web portal TFS, I see all my tasks.
update - 06 OCT 2016 - 5:20 PM IST.
We did further investigation. The situation is that our company had users in TFS using Sharepoint user IDs. Later the Domain controller was introduced and everyone migrated to the domain. So now we have two users (with different domains) for the old users who were present at the time of Sharepoint user base.
We did SQL Profiler on the TFS DB while running Query from Web Portal and VS 2015 for affected user.
[![two users returned from TFS][1]][1]
then VS2015 takes the old user (Which we dont want) to find all Assigned work items as shown below
Now IF i manually go change the query text and add FABRICAM in the domain or IF i run the query from WEB Portal, the correct user is picked up and results start showing as shown below
This works well with my VS2015. Please double check if it can work with web portal.
Try to clear TFS and VS cache and try it again.
I've upgraded our TFS 2010 to TFS 2012 without any issues. I can connect to the source control, checkin, everything I need to Work.
But if I go to the settings page for the team project I'm connected to, the following options work as expected:
Team project: Source Control
Team project: Portal settings
Team Project Collection: Source Control
Team Project Collection: Process Template Manager
But the rest of the options on the settings page just gives me this error
I've tried looking at the requests Visual Studio makes to the TFS server using Fiddler, and with the ones that don't work, no requests are actually being made to the server. So it seems like the server is never being contacted for those specific options.
I've tested this on two independent installations of Visual studio 2012, runnning on Windows 8.
EDIT
I just installed VS2010 SP1 on one of the machines, and I can just fine access all of the following settings options: Security, Group Membership, Areas and Iterations, Portal Settings and Source Control.
Looks like a VS2012 issue of some sort.
We resolved our issue with this by running VS 2012 with our domain credentials. We use VMs for development, so we do not directly login into the domain. To run VS, we use the following (as a batch file):
runas /netonly /user: username "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
where username is your domain credential.
It sounds like the code is still using some values that are cached on the client after the upgrade. How long ago was it that you upgraded the server?
To test whether that is it, rename your cache folder (with VS 2012 closed) and launch VS 2012 again so it recreates the cache from scratch.
C:\Users\\AppData\Local\Microsoft\Team Foundation\4.0
I have a project on vs 2010. I have tried to add project on windows server 2003 which has tfs 2010 installed. Later on I have switched to windows server 2008 and then installed tfs 2010 again. But I have changed server name.
Now, when I try to add project to tfs, I receive and error says that;
Team Foundation services are not available from server http://old server name:8080/tfs/. Technical information (for administrator): The remote name could not be resolved: 'old server name'
I have tried to add different projects but I havent received any errors. I am thinking problem is like, visual studio installed on my client computer has registered project with old server name and still tries the same server but team explorer can not find the server.
what shall I do?
PS: I am not tring to get my codes on old server. I did not use tfs, just wanted to learn it.
If you get the message when you open Visual Studio then you need to go to Team Explorer and click the "Connect to Team Project" button, then click on the "servers" button and remove the old server. If you need to you can also add the new server here.
If it's when you're opening the solution then you need to remove the Source Control bindings
open the solution and then go to "File", "Source Control", "Change Source Control" this will open up a screen where you can Unbind the Projects and Solutions from the old server.