33

I am using Azure Devops and VS2017 15.9.7. I am logged into Devops and can sync. When I open my project I get a message

"TF30063": You are not authorized to access dev.azure.com/myproject

I have tried going into credentials manager and deleting all the credentials for the devops organisation.

I have looked at this question and tried logging out via the browser within VS

Kirsten
  • 12,891
  • 31
  • 150
  • 276
  • https://docs.microsoft.com/en-us/azure/devops/repos/git/auth-overview?view=azure-devops – Kirsten Mar 24 '19 at 01:36
  • https://stackoverflow.com/questions/45540726/tf30063-error-from-visual-studio-team-explorer-but-connected-from-the-web?noredirect=1&lq=1 – Kirsten Mar 24 '19 at 20:03

7 Answers7

36

TF30063:You are not authorized to access dev.azure.com but I can connect

I have encountered the same issue. (I need to switch back and forth between work account and test account). Of course, there could be so many reasons and it could be different for each (cached another account, or modified the password).

To resolve this issue I have two methods/steps.


Step 1 is to clear the credential from credential manager:

Go to Control Panel (with small icon view)-->User Accounts-->Manage your credentials (on the left column)-->Select Windows Credentials-->Scroll down to the Generic Credentials section and look for your TFS server connection.


Step 2 is to click on the operation that Connects to the Team Projects which is the button/plug icon in the Team Explorer tab. Then to also right click the project you are getting this issue on and select Connect:

enter image description here

I also have tried other methods but not work for me, if possible, you can check if it is useful to you:

How To Fix TF30063 Error

Error TF30063: You are not authorized to access

ΩmegaMan
  • 26,526
  • 10
  • 91
  • 107
Leo Liu-MSFT
  • 62,538
  • 8
  • 91
  • 107
  • What do you mean by "And the method of clicking on the "Connect to Team Projects button" in the Team Explorer tab, then right click the project you are getting this issue on and select connect." I can't see such a button in Team Explorer. – Kirsten Mar 25 '19 at 06:39
  • 1
    @KirstenGreed, Updated with screenshot, hope it to be more clearer. – Leo Liu-MSFT Mar 25 '19 at 06:47
  • thanks, I exited everything I could see in credentials manager and re-connected like you show, but the problem persists. – Kirsten Mar 25 '19 at 06:48
  • 1
    I am using Azure Devops not TFS Server – Kirsten Mar 25 '19 at 06:57
  • 12
    The problem was that I was opening the project using the Recent Project section of the start page. I closed VS, re-opened and then opened the project via "connect: in Team Explorer. Then exited. Now it seems to open ok either way. – Kirsten Mar 25 '19 at 22:37
  • 1
    @KirstenGreed, Great! Thanks for sharing the info here. And it could help other community members who get the same issues – Leo Liu-MSFT Mar 26 '19 at 01:37
  • By doing the removal of the old credentials on the box I was working on, allowed me to connect to the azure devops project. Thank you for this answer. – ΩmegaMan Aug 16 '19 at 13:46
  • I found removing my TFS connection, then re-adding it worked a treat... I have no issue with our git projects however... only TFS – davewasthere Aug 30 '19 at 03:37
  • Works also for VS2022.. sign out of VS, then sign in and when done just connect to a project as @LeoLiu-MSFT mentioned in step 2.. cheers – B8ightY Nov 10 '21 at 15:28
14

The comment by Kirsten Greed in the accepted solution resolved the issue for me. Reproduced here:

The problem was that I was opening the project using the Recent Project section of the start page. I closed VS, re-opened and then opened the project via "connect: in Team Explorer. Then exited. Now it seems to open ok either way.

twildeman
  • 437
  • 4
  • 8
6

I had the same issue, It solved by simply rerunning the Visual Studio as Administrator.

nAviD
  • 2,323
  • 1
  • 25
  • 46
6

Running this command in cmd prompt, forces the re-authentication screen to come up and worked for me:

tf.exe get . /r

NOTE: you may need to locate tf.exe on your disk. For instance I have it at this location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe

Geoffrey McGrath
  • 1,593
  • 1
  • 13
  • 33
metasapien
  • 61
  • 1
  • 2
  • This worked for me after I previously tried unticking all the accounts in the account filter of the Account settings page. – Josh Nov 24 '21 at 11:15
  • Esto funcionó para mí en VS 2022. Pero en vez de encontrar el archivo TF.exe en "Program File (x86)" , lo encontré en "Program Files". Ejecuté el comando tf.exe get ./r sin tener el VS abierto y al abrirlo nuevamente no me pidió las credenciales pero ya estaba conectado. – user2952794 Apr 01 '22 at 15:35
1

Another reason for this error is that you might have to re-enter your credentials in Visual Studio:

enter image description here

Restarting Visual Studio and connecting to Azure DevOps did the trick for me.

hbulens
  • 1,670
  • 3
  • 24
  • 40
0

Step 1: Add "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" in the environment variable path

Step 2: remove azuredevops org related credential from credential manager

Step 3: Delete this folder:

C:\Users<UserName>\AppData\Local\Microsoft\Team Foundation\7.0\Cache

Step 3:

run tf workspaces /collection:https://dev.azure.com/royalmailgroup in cmd

0

In Visual Studio>Navigate to Tools > Nuget Package Manager >Package Manage Settings>Azure Service Authentication>Verify/Change the account

Vinay
  • 1