43

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
  • 15,730
  • 41
  • 179
  • 318
  • https://learn.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

12 Answers12

47

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
  • 29,542
  • 12
  • 100
  • 122
Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • 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 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
  • 16
    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 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
27

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
  • 599
  • 5
  • 10
  • 2
    This makes absolutely NO sense, logically, ... but 100 percent worked for me! Thanks Microsoft? Why the heck can it not authorize when opening the project directly, vs. just going into VS without a project? ‍♂️ ... well, at least I was able to check in now! – eidylon Oct 18 '22 at 14:02
12

If the is problem like below:

problem screen shot here

The solution will be like below:

Solution screen shot 1 here

And after that select:

Re-enter your credentials

anastaciu
  • 23,467
  • 7
  • 28
  • 53
Jay Bharat
  • 691
  • 7
  • 6
8

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

nAviD
  • 2,784
  • 1
  • 33
  • 54
7

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,663
  • 1
  • 14
  • 35
metasapien
  • 71
  • 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
  • Note this will start downloading *every* $thing from AzDO, recursively. Not recommended. – Orangutech Sep 12 '22 at 23:09
5

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,872
  • 3
  • 24
  • 45
3

None of the other methods above worked for me. I tried this in visual studio 2022 and it worked.

Open the Developer PowerShell (search for PowerShell) and type in the following:

TF vc permission

This will bring up a login screen and allow you to log in. After that you should have permission.

Fiach Reid
  • 6,149
  • 2
  • 30
  • 34
Lucky Lindy
  • 133
  • 8
2

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

1

It might be the case of a password change. In my case I had update my account password in a different machine. So on machine #02 I went to Visual Studio > Account Settings. After the pop-up opened, there was a message to re-enter credentials. Sometimes the password isn't updated across all used app/services and you have to enter that manually. Hope that helps.

LFarias
  • 21
  • 5
0

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

Vinay
  • 1
0

Leo Liu's answer got me on the right track. My problem could have originated from having two different Azure DevOps accounts cached in Windows Credentials and Visual Studio started choosing which one to authenticate with at random.

  1. Log out of both accounts in Windows Credentials. (The Manage Connections window does not have access to source control now.)
  2. Open up the Azure DevOps website and logout there.
  3. Login on Azure DevOps website. (Visual Studio's Manage Connections can access source control again.)
Threeze
  • 1
  • 1
0

What did it for me was open VS without code and connect via Team Explorer, but then also it threw the same error and after some time I logged out of azure web and tried connecting via Team Explorer again and it worked.