Change default expired/disabled subscription

Quote from moshe on 26/12/2021, 8:49 amProblem
User logs in the portal and the main subscription has expired adding new subscription key ( such as azurepass ) results that all the services only displays resources from the expired/disabled subscription
Solution
login to your account and open Cloud Shell
run the following command to get a list of your subscription
az account list –all
get a list of your accounts, choose and copy the ID of the account with state “Enabled”
set the account as default (change the account id )
az account set -s < ACCOUNT ID >
Example:
az account set -s ”620ca87d-f928-4888-9770-708e30e75a15″
Problem
User logs in the portal and the main subscription has expired adding new subscription key ( such as azurepass ) results that all the services only displays resources from the expired/disabled subscription
Solution
login to your account and open Cloud Shell
run the following command to get a list of your subscription
az account list –all
get a list of your accounts, choose and copy the ID of the account with state “Enabled”
set the account as default (change the account id )
az account set -s < ACCOUNT ID >
Example:
az account set -s ”620ca87d-f928-4888-9770-708e30e75a15″