Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

[v0.10.0] Could not retrieve the token associated with Visual Studio Code. Works with v0.9.11 #443

@lippertmarkus

Description

@lippertmarkus
  • VS Code Version: 1.64.2
  • Azure Account Extension Version: v0.10.0
  • OS Version: Windows_NT x64 10.0.19044

Steps to Reproduce:

We're having a extension which uses the Azure Account Extension as a dependency. With the new version v0.10.0 some users (but not all) in our tenant get the following error:
image

When those users downgrade to v0.9.11 the issue does not happen. Signing in and out again didn't help. Deleting the credentials stored in the Windows credential store also didn't.

Our extension uses the following snippet to get tokens:

const apiAzureAccount = vscode.extensions.getExtension<AzureAccountExtensionApi>('ms-vscode.azure-account')!.exports;
if (!(await apiAzureAccount.waitForLogin())) {
	await vscode.commands.executeCommand('azure-account.askForLogin');
}

const credential = new VisualStudioCodeCredential();
var token = await credential.getToken(tokenAudience, { tenantId: tenantID });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions