collie-cli icon indicating copy to clipboard operation
collie-cli copied to clipboard

Querying multiple azure tenants requires logging in to each

Open JohannesRudolph opened this issue 3 years ago • 0 comments

Describe the bug When reading tenant data from multiple Azure AAD tenants, I have to manually az login -t ... into each before running collie, else I will receive an empty tenant list

Reach of the bug Everyone using more than one azure tenant with collie.

Impact of the bug Incorrect behavior.

To Reproduce Steps to reproduce the behavior:

  1. collie tenant list meshcloud-dev --platform azure.meshcloud-azure-dev
  2. collie tenant list meshcloud-prod --platform azure.meshcloud-azure-prod

Observe that the second command returns no tenants

No objects to list
Queried from cloud - azure.meshcloud-azure-prod: 2.564s.

Expected behavior Both tenant lists show the subscriptions in each respective tenant

Implementation Hints

It may have been introduced with the changes around enabling the collie tenant tree command. I think before we used az account list which worked cross AAD Tenant even when az login is logged into the wrong tenant.

JohannesRudolph avatar Jun 30 '22 09:06 JohannesRudolph