The subscription of 'concierge subscription' has more than one match in cloud 'AzureCloud'

Viewed 1170

Using one session of an azure sandbox which lasts for 4 hours. Once one session gets expired, I've created a new sandbox to continue practicing exercises from the Azure portal. After execuing command: az account set --subscription "Concierge Subscription" I am getting below error:

enter image description here

However, In Azure portal there is just one "Concierge Subscription". How can I close other subscription of the same name?

2 Answers

The --subscription parameter accepts either the Name or ID of a given subscription.

You can get navigate to Subscriptions blade on Azure Portal to get the Subscription ID of the current active Sandbox subscription, and then set that subscription to be the current active subscription using:

az account set -s <subscription-id>

Azure CLI Command reference: az account

I think is it just the local cache of AZ cli that is not refreshed. The new subscriptions keeps adding, without removing the expired one. Run az account list --refresh, this will remove the expired ones.

Related