I cannot create a webapp with a Azure SQL Database

Amir Sadri 0 Reputation points
2025-09-19T18:12:00.0833333+00:00

SQLAzure Is never available no matter what options I select.

User's image

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Taylor - AST Consulting Inc 715 Reputation points
    2025-09-19T19:13:59.5433333+00:00

    Hello Amir,

    I have listed troubleshooting information below to help you with your Azure SQL Database:

    • Root cause: In Azure Static Web Apps, don’t attach Azure SQL during creation. Create the Static Web App first, then link your database from Settings > Database connection. If Azure SQL looks unavailable there, it’s typically a provider registration, SQL server networking, tenant policies, or cloud/region.
    • Fix flow:
      • Link after creation: Open your Static Web App > Settings > Database connection > Link existing database.
      • Register provider:
    az provider register --namespace Microsoft.Sql
    az provider list --query "[?namespace=='Microsoft.Sql']" --output table
    
    • SQL networking: On your SQL Server, enable public access, add your client IPv4 (for local dev), and check “Allow Azure services and resources to access this server.” Private endpoint-only setups are not supported by SWA database connections today.
      • Supported type: Use Azure SQL Database (PaaS). Managed Instance/private-only isn’t supported by SWA database connections.
      • Tenant policies/region: If your org enforces private endpoints or you’re in a sovereign cloud, the option can be disabled.
      Quick path: Use Connection string (SQL auth) to get going, then switch to Managed Identity after granting DB permissions. Docs:

    Azure SQL tutorial:

    https://learn.microsoft.com/azure/static-web-apps/database-azure-sql

    https://learn.microsoft.com/azure/static-web-apps/database-overview

    Configuration:

    https://learn.microsoft.com/azure/static-web-apps/database-configuration

    Let me know if you have other questions. Also, if this was helpful, please mark this as an "Answer" as this helps the community find relevant information.

    Best regards,

    Andrew Taylor

    0 comments No comments

  2. RAMAMURTHY MAKARAPU 1,125 Reputation points Microsoft External Staff Moderator
    2025-09-19T19:43:44.7233333+00:00

    Hi @Amir Sadri ,

    Thank you for submitting your question on Microsoft Q&A.

    According to the error message in the Azure portal:

    "SQLAzure is not available for your selection of subscription and location." This usually indicates that your current subscription type and chosen region do not support SQLAzure at this time. You can try the following steps to address this issue:

    Troubleshooting Steps

    1. Check Region Availability:
    • SQLAzure may not be available in your chosen region.
    • Consider switching to another region, such as Central US, East US, or West Europe, in the Basics tab.
    1. Verify Subscription Type:
    • Certain subscription types, like Azure Free Trial, Student, or Sponsorship, might have limited access to specific services.
    • Review your subscription limits in the Azure Subscription Portal.
    1. Quota or Policy Restrictions:
    • Your organization or administrator may have policies that restrict access to SQLAzure.
    • Consult your Azure administrator or review Azure Policy settings.
    1. Try a Different Deployment Option:
    • If you are using a template or a particular deployment method, try creating the Azure SQL Database directly from the portal using the creation wizard.

    Could you please verify the below comment as well

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.