StorageTableNotFound - Storage Table Not Found: Table Does Not Exist
Seeing StorageTableNotFound means Azure Table Storage couldn't resolve your table—name format violates DNS rules, the table never got created, or it was deleted (and unlike blobs, there's no soft-delete recovery). This 404 client-side error happens when Azure Storage validates table names before operations. Table names must be DNS-compliant (3-63 characters, alphanumeric plus hyphens, no consecutive hyphens, start/end with alphanumeric). Most common when accessing Table Storage for application data, but also surfaces in AKS application state storage, Azure SQL metadata tables, and App Service configuration storage. Once deleted, tables are permanently gone—no recovery window.
#Common Causes
- →Invalid Table Name Format: The table name doesn't match DNS-compliant naming rules (3-63 characters, alphanumeric plus hyphens, no consecutive hyphens, must start/end with alphanumeric). Table names are case-sensitive. This is persistent—you must use the correct table name format.
- →Non-Existent Table: The table hasn't been created in the storage account. Tables must be explicitly created before use—they don't auto-create on first access like some storage services. This is persistent—you must create the table before operations.
- →Deleted Table: The table was deleted from the storage account. Unlike blobs and containers, Table Storage doesn't support soft-delete—deleted tables are permanently removed with no recovery period. This is persistent—you must create a new table with the same or different name.
✓Solutions
- 1Step 1: Diagnose - List all tables in the storage account to see available table names: az storage table list --account-name <account> --account-key <key> --query "[].name" --output table
- 2Step 2: Diagnose - Check if a specific table exists: az storage table exists --account-name <account> --account-key <key> --name <table> --query "exists" --output tsv
- 3Step 3: Diagnose - Verify table name format matches DNS-compliant rules (3-63 characters, alphanumeric plus hyphens, no consecutive hyphens).
- 4Step 4: Fix - If table name format is wrong, use the correct format. Ensure the name starts and ends with alphanumeric characters.
- 5Step 5: Fix - If table doesn't exist, create it: az storage table create --account-name <account> --account-key <key> --name <table>
- 6Step 6: Fix - If table was deleted, create a new table. Deleted tables can't be restored, so use the same name or a different one.
- 7Step 7: Verify - After creating the table, retry your operation. It should succeed instead of returning StorageTableNotFound.
</>Code Examples
1# This script helps diagnose StorageTableNotFound by checking table existence
2
3# Step 1: Set storage account details (replace with your values)
4STORAGE_ACCOUNT="mystorageaccount"
5# Note: For production, use managed identity or SAS tokens instead of account key
6STORAGE_KEY="your-storage-account-key"
7TABLE_NAME="mytable"
8echo "Checking table: ${TABLE_NAME} in storage account: ${STORAGE_ACCOUNT}"
9
10# Step 2: List all tables in the storage account
11echo "Listing all tables in storage account..."
12az storage table list \
13 --account-name ${STORAGE_ACCOUNT} \
14 --account-key ${STORAGE_KEY} \
15 --query "[].name" \
16 --output table
17
18# Step 3: Check if specific table exists
19echo "Checking if table '${TABLE_NAME}' exists..."
20TABLE_EXISTS=$(az storage table exists \
21 --account-name ${STORAGE_ACCOUNT} \
22 --account-key ${STORAGE_KEY} \
23 --name ${TABLE_NAME} \
24 --query "exists" \
25 --output tsv)
26
27if [ "${TABLE_EXISTS}" == "true" ]; then
28 echo "Table '${TABLE_NAME}' exists"
29else
30 echo "Table '${TABLE_NAME}' does not exist"
31fi
32
33# Step 4: Verify table name format (DNS-compliant)
34echo "Verifying table name format..."
35if [[ ! ${TABLE_NAME} =~ ^[a-z0-9][a-z0-9-]*[a-z0-9]$ ]] || [ ${#TABLE_NAME} -lt 3 ] || [ ${#TABLE_NAME} -gt 63 ]; then
36 echo "ERROR: Invalid table name format"
37 echo "Requirements:"
38 echo " - 3-63 characters"
39 echo " - Alphanumeric plus hyphens"
40 echo " - No consecutive hyphens"
41 echo " - Must start and end with alphanumeric"
42else
43 echo "Table name format is valid"
44fi
45
46# Step 5: Create table if it doesn't exist
47if [ "${TABLE_EXISTS}" != "true" ]; then
48 echo "Creating table '${TABLE_NAME}'..."
49 if az storage table create \
50 --account-name ${STORAGE_ACCOUNT} \
51 --account-key ${STORAGE_KEY} \
52 --name ${TABLE_NAME} 2>&1; then
53 echo "Table created successfully"
54 else
55 echo "ERROR: Failed to create table"
56 echo "Check table name format and storage account permissions"
57 fi
58fi
59
60# Step 6: Get table properties (if table exists)
61if [ "${TABLE_EXISTS}" == "true" ] || az storage table exists --account-name ${STORAGE_ACCOUNT} --account-key ${STORAGE_KEY} --name ${TABLE_NAME} --query "exists" -o tsv | grep -q "true"; then
62 echo "Getting table properties..."
63 az storage table show \
64 --account-name ${STORAGE_ACCOUNT} \
65 --account-key ${STORAGE_KEY} \
66 --name ${TABLE_NAME} \
67 --query "{Name:name}" \
68 --output table
69fi
70
71# Step 7: Note about table deletion
72echo ""
73echo "Important: Table Storage doesn't support soft-delete."
74echo "Deleted tables are permanently removed and cannot be recovered."↗Related Errors
Provider Information
This error code is specific to AZURE services. For more information, refer to the official AZURE documentation.