vscode-azure-account icon indicating copy to clipboard operation
vscode-azure-account copied to clipboard

Could not retrieve the token associated with Visual Studio Code

Open xiaolang124 opened this issue 4 years ago • 0 comments

When I use web codespaces, I try to get sql token and I get this error.

const vsCredential = new identity.VisualStudioCodeCredential({ tenantId: tenantId });
const accessToken = await credential!.getToken("https://database.windows.net//.default");

Could not retrieve the token associated with Visual Studio Code. Did you connect using the 'Azure Account' extension?

But when I change to desktop codespaces, I can get sql token.

Do you have any idea why this happens? And how can I fix this.

xiaolang124 avatar Sep 18 '21 08:09 xiaolang124