The subscription of xxx' doesn't exist in cloud 'AzureCloud'

For anyone finding this question based on the title but with a different problem to the OP.

Symptoms:

  • subscription isn't showing in az account list output
  • az account set -s subscription_id fails with error message in title

Possible solution:

  • You need to re-auth the cli with az login

Test the link you posted and get the same error, the screenshot below: enter image description here

It seems that because you are log in to Azure Portal and there is a tenant which you also logged in. If the tenant only has one subscription, then you set the subscription in another tenant with the command az account set --subscription="${SUBSCRIPTION_ID}", you will get the error:

The subscription of 'xxxx' doesn't exist in cloud 'AzureCloud'

You needn't use the command az account set --subscription="${SUBSCRIPTION_ID}" if the tenant only has one subscription. If you want to use, please use the subscription Id show you. The test result as the screenshot below: enter image description here


Just log in again

az login

That will update the subscriptions you belong.