37

I'm noticing this repeatedly with VS2022. Everything starts off well but eventually it seems to lose my authorization on my Azure DevOps project.

I open a solution and VS 2022 connects to Azure Devops. Maybe I make a commit or two and type the little hashtag ('#') symbol in the comment box and sure enough, the list of available work-items appears for me to associate with the checkin. Things are great.

But eventually, that stops working. Nothing appears when I hit the hashtag. So I go to the Team Explorer window and I see this message at the top:

TF30063: You are not authorized to access dev.azure.com/<mycompanyname>.

I try reconnecting through Team Explorer but it doesn't do anything. But if I restart Visual Studio, I'm all connected again. For a while until it happens again.

Anyone have this or know how to fix it? It does not happen to me with VS2019

Joe
  • 5,394
  • 3
  • 23
  • 54
  • 2
    Two related links about this problem. https://developercommunity.visualstudio.com/t/VS30063:-You-are-not-authorized-to-acces/1532255?q=%5BVisual+Studio+2022+version+17.0%5D&ftype=problem&space=8&stateGroup=active&sort=votes https://developercommunity.visualstudio.com/t/tfs-error-tf30063-you-are-not-authorized-5/423450 – Jose Luis Nov 26 '21 at 15:56
  • 1
    From the long discussions on those threads, it would appear there are two groups of users affected by this: 1. People like me using Git. For me its not difficult. I just have to restart visual studio. 2. People using TFS. This appears to be really messing up their workflows. – Joe Dec 09 '21 at 15:03
  • 1
    An update about this bug: https://developercommunity.visualstudio.com/t/VS30063:-You-are-not-authorized-to-acces/1532255#T-N1613171. Expected release date of the update: https://developercommunity.visualstudio.com/t/VS30063:-You-are-not-authorized-to-acces/1532255#T-N1613189 (january 2022). An explanation of the bug: https://developercommunity.visualstudio.com/t/VS30063:-You-are-not-authorized-to-acces/1532255#T-N1613231 – Jose Luis Dec 15 '21 at 21:53

6 Answers6

29

Experienced the same problem was well. By accident I switched VS 2022 from the embeded to the system browser (Options->Accounts) and after restarting VS 2022 it worked well, however it can be a coincidence:

enter image description here

6

Just to put a bookend on this, Dan Schulte of Microsoft has officially responded in this thread (see his Dec 14 reply) that they've found the root cause of this problem and have created a fix for it but that the fix won't be released until January.

Apparently it was pretty low level and very hairy and affected not just VS2022 but also previous version. It was something that none of the lists workarounds could truly fix. So I wouldn't bother running repair on your VS install or any of that. It won't fix it.

Joe
  • 5,394
  • 3
  • 23
  • 54
  • The said "January", not "January 1st". You've made this same post here and in the Microsoft thread. It doesn't make anything go any faster, it just makes noise for everyone subscribed it. We get that you are impatient. We all are – Joe Jan 04 '22 at 15:39
  • 1
    No there is no rule. You are free to make as much noise as you want. Post away, kid. – Joe Jan 05 '22 at 16:33
  • 1
    fix is in. So happy! Such an annoying error message – Nona Drake Jan 14 '22 at 04:34
  • 1
    It's March 11th and I still get this several times per week, so much for a fix being in. – Lemiarty Mar 11 '22 at 18:14
  • Judging by the steep drop-off in the number of people complaining about it, for the overwhelming majority of people, updating to version 17.1 does appear to have fixed the issue. You should contact Microsoft if you are still having it. File Feedback through the Help Menu – Joe Mar 11 '22 at 18:30
  • Still having it in 17.3.1, but not as frequently. – Paul Smith Aug 18 '22 at 18:53
  • Here it is May 2023 and this problem still occurs with the most recent version. Seems as though it gets addressed and then gets broken again in a future release, gets fixed again then broken again...rinse repeat. Someone needs help with their branch merging. – Lemiarty May 10 '23 at 18:12
  • I haven't seen it for over a year – Joe May 10 '23 at 19:48
4

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

Open the Developer PowerShell (View > Terminal) 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, after restarting Visual Studio.

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

I had same problem and solved by following this:

  • restart OS;
  • open Visual Studio Installer;
  • on Visual Studio 2022 item, click "Other" button, then "Repair".

that's all.

sisma
  • 47
  • 1
  • 3
    At first I thought this actually works. Then after few hours the issue returned, so this is not a solution unfortunately. – Бранко Пејић Dec 09 '21 at 14:28
  • I must admit, I'm skeptical too. Right now I just did the repair, so far so good. TFS seems to connect and work we'll see. However it is best to wait Microsoft which should eventually fix the problem. – Marc Roussel Dec 10 '21 at 02:26
3

after updating the version to 17.0.5 its problem was solved.

Salar Afshar
  • 229
  • 1
  • 2
  • 13
1

The preferred answer (Andreas Schneider) almost worked for me. I needed the additional step to reenter my credentials under the Azure Service Authentication. Underneath the 'Choose an account' button there was a clickable warning symbol prompting me to re-enter my credentials. After doing that and restarting Visual Studio, I was able to access out azure package resources again.

Azure Service Authenticaion Account Dialog

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
  • Thanks this worked for me as well. It gave the added explanation "since you have moved locations you need to log in again with MFA"... which is true, i was on hotel wifi out of town the last time i was working. Strange that it doesn't prompt you ... just errors out until you find this setting! – TCC Apr 08 '23 at 15:38