Forum Discussion
Azure Cloud Shell Instance Failed to provision
Hi everyone,
I have an annoying error when I'm starting from the Azure portal a Cloud shell session, telling me this error :
{"code":"InvalidSubscription","message":"Invalid subscription identifier provided."}
I've found no clue to fix it, and received no guidance from the error itself..
Does someone has a solution please ?
4 Replies
That error usually means Cloud Shell is trying to initialize against a subscription reference that is no longer valid for your signed-in context.
I would try these steps:
- In the Azure portal, switch directory and subscription explicitly from the top-right directory/subscription filter, then reopen Cloud Shell.
- Open Cloud Shell settings and reset/recreate the Cloud Shell storage if it is pointing to an old subscription or deleted storage account.
- Check whether your user still has at least Reader access to the subscription and enough rights to the storage account/resource group used by Cloud Shell.
- If you have multiple tenants, sign out/in or use an InPrivate window to make sure the portal is not keeping a stale tenant/subscription context.
- Try Cloud Shell from https://shell.azure.com and select Bash/PowerShell fresh.
If the storage account used by Cloud Shell was deleted or the subscription was moved/disabled, the quickest fix is often to remove the old Cloud Shell storage configuration and let Cloud Shell create a new storage account in a valid subscription.
Docs:
https://learn.microsoft.com/azure/cloud-shell/overview
https://learn.microsoft.com/azure/cloud-shell/persisting-shell-storage- ValentinoCCopper Contributor
Do you have access to any subscriptions?
- ValentinoCCopper Contributor
In the Azure Portal
- Go to Subscriptions
- Make sure you have at least one active subscription
- Click "Set as default subscription"
or inside Cloud Shell (if it opens partially)
az account list --output table az account set --subscription "<subscription-id>"
You Dont have Access to Any SubscriptionThis happens often with:
- New accounts
- Guest users in another tenant
Check:
- Go to Subcriptions > If empty > you dont have access
- Ask your admin to assign:
- Reader
- Preferably Contributor
- etienne-143Copper Contributor
Yes, I have access to it