question

PeteRobinson-5548 avatar image
0 Votes"
PeteRobinson-5548 asked ·

Cannot login to VS2019 / Azure subscriptions are gone

I was recently looking at the Bridge to Kubernetes extension in VS2019 Community (16.0.31105.61 D16.9) - but noticed I was not connected to Azure. Attempted to sign-in (from VS) ... VS was not able to sign in ("We could not refresh the credentials for the account"), one suggestion was to remove "%localappdata%.identityservice" and "%localappdata%\Microsoft\VSCommon\OnlineLicensing".

This didn't work and I am no longer signed into VS - it won't even let me use it in evaluation mode now ...

I checked the logs under "%temp%\servicehub\logs" and noticed:
```
03/15/2021 20:43:33 GMT Standard Time : Error : Exception getting tenant membership Error:'System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at HttpResponseMessage System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at async Task<JObject> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.GetParsedWebResponseAsync(HttpClient httpClient, Uri uri, ITelemetryOperation telemetryOp, AuthenticationInfo authInfo, CancellationToken cancellationToken)
at async Task<JObject> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.GetParsedWebResponseAsync(HttpClient httpClient, Uri uri, ITelemetryOperation telemetryOp, AuthenticationInfo authInfo, CancellationToken cancellationToken)
at async Task<ImmutableArray<TenantInformation>> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.GetTenantInformationAsync(HttpClient client, AuthenticationInfo authInfo, bool promptIfNeeded, string queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary<string, string> additionalAuthProperties, CancellationToken cancellationToken)', waiting '1' seconds to retry. On retry count '1'
```


I tried logging into the azure portal - this no longer shows my subscriptions.

I've tried the report a problem link from the VS installer - this takes me to the MS website where I get the following error:
```
Error signing in: '{"text":"ERR_SIGN_IN: Authentication failed.; Microsoft.Rest.Azure.CloudException\r\nMicrosoft.Rest.Azure.CloudException: Authentication failed.\r\n at Microsoft.Azure.Management.ResourceManager.TenantsOperations.<ListWithHttpMessagesAsync>d_5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Azure.Management.ResourceManager.TenantsOperationsExtensions.<ListAsync>d1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Microsoft.Developer.IdentityService.AccountProvider.NetworkServicesImpl.<GetTenantMembershipAsync>d13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.Developer.IdentityService.AccountProvider.NetworkServicesImpl.<GetTenantMembershipAsync>d13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderService.<GetTenantInfoAndScopeInfoAsync>d36.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderService.<CreateAccountFromAadAsync>d_34.MoveNext()\r\n\r\n"}'
````

This all appears to relate to my missing azure subscriptions - unfortunately I cannot raise a support request in azure now, or on https://developercommunity.visualstudio.com as I cannot login!

vs-general
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PeteRobinson-5548 avatar image
0 Votes"
PeteRobinson-5548 answered ·

This seems to have started working again ... I can login to VS 2019 now ...

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Glad to hear, please don't forget to mark the correct answer.




0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered ·

The profile may now be corrupt.

  • Might try from an in-private session

  • try from another pc

  • try creating a new windows user account, logon with new account and sign on

--please don't forget to Accept as answer if the reply is helpful--





· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Do you mean the profile on the local windows machine ?

I've tried logging into azure in 2 different browsers and a private mode firefox.

It seems to be the azure subscription that is the problem

0 Votes 0 ·