Kirsten
Kirsten

Reputation: 18066

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

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

Upvotes: 50

Views: 75745

Answers (13)

takde pape
takde pape

Reputation: 29

In my case, it is because of the Date and Time of the PC. It works fine after I do the below steps:

  1. Close Visual Studio
  2. PC Date Time > Untick "Set Time Automatically"
  3. PC Date Time > Tick "Set Time Automatically"
  4. Open Visual Studio

Upvotes: 0

Lucky Lindy
Lucky Lindy

Reputation: 303

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.

Upvotes: 5

Marko Grbeš
Marko Grbeš

Reputation: 11

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.

Upvotes: 0

LFarias
LFarias

Reputation: 21

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.

Upvotes: 1

Jay Bharat
Jay Bharat

Reputation: 889

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

Upvotes: 22

Threeze
Threeze

Reputation: 11

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.)

Upvotes: 0

jitendra kandpal
jitendra kandpal

Reputation: 19

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

Upvotes: 1

Vinay
Vinay

Reputation: 1

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

Upvotes: 0

hbulens
hbulens

Reputation: 1969

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.

Upvotes: 6

metasapien
metasapien

Reputation: 101

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

Upvotes: 10

nAviD
nAviD

Reputation: 3261

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

Upvotes: 9

twildeman
twildeman

Reputation: 629

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.

Upvotes: 30

Leo Liu
Leo Liu

Reputation: 76760

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

Upvotes: 53

Related Questions