I am trying to list all private dns zones in an Azure subscription with this az cli command:
az network private-dns zone list --subscription $subscriptionName
But for some subscriptions i get this error message:
ERROR: (BadRequest) The specified subscription <SUB_ID> does not existCode: BadRequestMessage: The specified subscription <SUB_ID> does not exist
even though I can find the subscription in the Azure portal.
It does not happen for all subscriptions i try with the command, just a handful.I can't find a correlation between the ones which work.
What can cause this error?