Forum Discussion

etienne-143's avatar
etienne-143
Copper Contributor
Mar 17, 2026

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:

    1. In the Azure portal, switch directory and subscription explicitly from the top-right directory/subscription filter, then reopen Cloud Shell.
    2. Open Cloud Shell settings and reset/recreate the Cloud Shell storage if it is pointing to an old subscription or deleted storage account.
    3. 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.
    4. 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.
    5. 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

  • ValentinoC's avatar
    ValentinoC
    Copper Contributor

    In the Azure Portal

    1. Go to Subscriptions
    2. Make sure you have at least one active subscription
    3. 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 Subscription

    This happens often with:

    • New accounts
    • Guest users in another tenant

    Check:

    1. Go to Subcriptions > If empty > you dont have access
    2. Ask your admin to assign:
    • Reader
    • Preferably Contributor