microsoft / microsoft/vscode-azureresourcegroups

The `exportAuthRecord` process does not respect the tenant when running in /azure

Open
#1,226 2 comments 0 reactions 1 assignee View on GitHub

@g2vinay is already working on this.

Since Oct 9, 2025.

P1
Dominant language
TypeScript
Stars
78
Forks
55
Avg merge
16h 49m
Merged PRs (30d)
139

Description

When running in /azure, e.g. in a BAMI tenant, the tenant ID is passed to the Azure Cloud Shell extension and used to sign in. However, exportAuthRecord does not pick up that tenant ID at all, and consequently, exports an authentication record that will not work with DefaultAzureCredential.

Additionally, even when passing in tenantId to DefaultAzureCredential's options, and with the @azure.argTenant setting altered to correct the tenant set by exportAuthRecord, I still cannot get DefaultAzureCredential to work. I also tried signing in to Azure CLI with az login --use-device-code -t <tenantId>, and while that was successful, DefaultAzureCredential is still failing.

/cc @g2vinay @alexweininger @meeraharidasa

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.