CodeMonkey
CodeMonkey

Reputation: 12424

Visual Studio keep requesting to choose azure account even if logged in

I am using VS 2017 with an Azure account. The account is logged in and I can see the account details at the top right corner.

When I try to restore Nuget packages, I keep getting a window telling me to select the azure account I want to use, and my account is an option to select. Even when I select my account, the window keeps popping back over and over, and I can't seem to get the packages..

What can be done?

Upvotes: 4

Views: 1974

Answers (3)

Ralf
Ralf

Reputation: 313

I'm not sure what triggered my problems, but I assume I had problems with my PAT credentials at some point and then I started to modify nuget.config (can be found here: %APPDATA%\NuGet). In the end I had the correct credentials but a wrong address in my nuget.config and just did not notice the small difference. Unfortunately VS' only reaction was to keep asking me for my credentials when trying to connect me to the wrong NuGet feed address.

Instead of this (I use my-repo instead of the actual name):

<add key="my-repo" value="https://pkgs.dev.azure.com/my-repo/_packaging/my-repo/nuget/v3/index.json" />

I had this:

<add key="my-repo" value="https://pkgs.dev.azure.com/in3/_packaging/my-repo/nuget/v3/index.json" />

I assume I had taken it from some other post or tutorial instead of azure's Artifacts area (https://dev.azure.com/my-repo/mc-projects/_packaging?_a=connect&feed=my-repo)

So even though I had the correct credentials in the nuget.config VS kept asking me for the credentials because of the wrong URL :-( The only hint that I got from VS was "Error Code: 16000" in the credentials dialog when clicking the ... But that always made me suspect the credentials.

Upvotes: 0

Bhargavi Annadevara
Bhargavi Annadevara

Reputation: 5502

I remember facing a similar issue of being asked to sign-in repeatedly on a different workstation. I had to go to the Credential Manager to remove saved creds and re-login with mine. Please check if that helps.

Upvotes: 0

Sajeetharan
Sajeetharan

Reputation: 222582

Two things you could try,

1)Try to clear the invalid cached data:

i) Close visual studio

ii) delete %localappdata%.IdentityService\

2) Report this problem via Visual Studio>Help>Send Feedback>Report a problem. This opens a new instance of "Visual Studio Feedback" which might solve your issue.

Upvotes: 2

Related Questions