Misleading (outdated?) exception message when VS re-authentication needed
See original GitHub issueNot sure if this belongs here or somewhere in an Azure VS extensions repo, but after upgrading to VS 15.5.7 my project started throwing the exception shown at the end, indicating I needed to re-auth my Azure credentials.
This is the main problem:
TS003: Error, TS001:
This account 'xxxx@gmail.com' needs re-authentication.
Please go to Tools->Azure Services Authentication, and re-authenticate the account you want to use.
There is no “Azure Services Authentication” in the “Tools” menu (or anywhere in VS2017, if VS search is to be trusted). Instead I had to open Cloud Explorer and click on the little person icon at the top (not the most discoverable feature, if you ask me, I gather a lot of folks leave Cloud Explorer off for performance reasons).
It was also misleading that the top-level message is “No connection string specified”.
Full exception sans trace:
Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException
HResult=0x80131500
Message=Parameters: Connectionstring: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/xxxx.
Exception Message: Tried the following 3 methods to get an access token, but none of them worked.
Parameters: Connectionstring: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/xxxx.
Exception Message: Tried to get token using Managed Service Identity. Unable to connect to the Managed Service Identity (MSI) endpoint. Please check that you are running on an Azure resource that has MSI setup.
Parameters: Connectionstring: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/xxxx.
Exception Message: Tried to get token using Visual Studio. Access token could not be acquired.
Exception for Visual Studio token provider Microsoft.Asal.TokenService.exe :
TS003: Error, TS001:
This account 'xxxx@gmail.com' needs re-authentication.
Please go to Tools->Azure Services Authentication, and re-authenticate the account you want to use.
Parameters: Connectionstring: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/xxxx.
Exception Message: Tried to get token using Azure CLI. Access token could not be acquired. 'az' is not recognized as an internal or external command, operable program or batch file.
Source=Microsoft.Azure.Services.AppAuthentication
StackTrace: ...
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Troubleshoot login to registry - Azure Container Registry
Unable to login to registry and you receive error unauthorized: authentication required or unauthorized: Application not registered with AAD ...
Read more >How to catch a Firebase Auth specific exceptions
FirebaseAuthInvalidCredentialsException: The email address is badly formatted. I'm using the code below to signup the user using email and ...
Read more >Azure AD authentication troubleshooting: Known problems ...
Known problems and solutions. Inactive MI user account · Corrupt or incorrect identity token or stale browser cookie · Duo error: Looks like ......
Read more >Troubleshooting Common Error Messages - RSA Community
Problem: Authentication Manager cannot connect to the identity source. This problem can occur for any of the following reasons: Incorrectly configured firewall.
Read more >Gateway Error Codes | Mastercard Developers Platform
This error can happen if a signing key originally belonging to the project has expired or been revoked. Verify that the Mastercard Developers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please fix this - I just ran into the same issue and wasted 30min until I found this thread
Repro steps: I changed my password and had a stale auth token I had to refresh
This is still present in Visual Studio 2019. Just got it this morning.
Exception for Visual Studio token provider Microsoft.Asal.TokenService.exe : TS003: Error, TS001: This account ‘me@myCompany.com’ needs re-authentication. Please go to Tools->Azure Services Authentication, and re-authenticate the account you want to use.