|
| 1 | +--- |
| 2 | +title: Create a canvas app from Azure SQL Database | Microsoft Docs |
| 3 | +description: Describes how to create canvas app from your data in Azure SQL Database |
| 4 | +author: tapanm-msft |
| 5 | +manager: kvivek |
| 6 | +ms.service: powerapps |
| 7 | +ms.topic: conceptual |
| 8 | +ms.custom: canvas |
| 9 | +ms.reviewer: |
| 10 | +ms.date: 11/04/2019 |
| 11 | +ms.author: tapanm |
| 12 | +search.audienceType: |
| 13 | + - maker |
| 14 | +search.app: |
| 15 | + - PowerApps |
| 16 | +--- |
| 17 | +# Preview: Create a canvas app from Azure SQL Database |
| 18 | + |
| 19 | +[This topic is pre-release documentation and is subject to change.] |
| 20 | + |
| 21 | +In this topic, you'll use data in your Azure SQL Database to create an app with PowerApps in minutes. You’ll have a fully functional app with your data that you can customize to fit your business needs and share on any device. |
| 22 | + |
| 23 | +> [!IMPORTANT] |
| 24 | +> - This is a preview feature. |
| 25 | +> - A preview feature may have limited availability and restricted functionality. A preview feature is available before an official release so that customers can get early access and provide feedback. |
| 26 | +
|
| 27 | +## Prerequisites |
| 28 | + |
| 29 | +- Your browser must have pop-ups enabled. |
| 30 | +- You need an Azure subscription. </br>If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/). |
| 31 | +- You need access to an existing SQL Database. </br> If you don't have an existing SQL Database, [create a new database](https://docs.microsoft.com/azure/sql-database/sql-database-single-database-get-started?tabs=azure-portal). |
| 32 | +- You need to allow PowerApps region [IP addresses or Azure services](#app-access-to-sql-database) access to SQL Database in firewall settings. |
| 33 | +- The SQL Database table must have at least one column with text data type. |
| 34 | +- You need a valid PowerApps license or sign up for a [30 day trial license](../signup-for-powerapps.md). |
| 35 | + |
| 36 | +## Create an app |
| 37 | + |
| 38 | +1. Sign into [Azure Portal](https://portal.azure.com). |
| 39 | +2. Navigate to your SQL Database. |
| 40 | +3. Select PowerApps. |
| 41 | + |
| 42 | + |
| 43 | +  |
| 44 | + |
| 45 | + > [!NOTE] |
| 46 | + > If you don't have a PowerApps license, you'll see a blue information bar with a link to start a trial. When you select to start trial, you'll be taken to a new tab where you'll be signed up for a license. Once complete, go back to the Azure portal and refresh the blade to continue. |
| 47 | +
|
| 48 | +4. Type a name for the app such as “Site Inspection”, “Fundraiser” or “Budget Tracker”. |
| 49 | + |
| 50 | +5. Enter SQL authentication password and if required, change the username. |
| 51 | +6. Select a table from the dropdown that you wish to use to create the app. |
| 52 | + |
| 53 | +7. Select **Create**. |
| 54 | + |
| 55 | + |
| 56 | +  |
| 57 | + |
| 58 | + The [PowerApps Studio](https://create.powerapps.com/studio/) opens in a new tab. If pop-up is blocked, update browser to allow pop-ups and retry. Once created, you'll have a 3 page app with data from your SQL Database. |
| 59 | + |
| 60 | +## Accessing your app |
| 61 | + |
| 62 | +To access the created app again, go to [make.powerapps.com](https://make.powerapps.com). |
| 63 | + |
| 64 | +## App environment and region |
| 65 | + |
| 66 | +The app you create with this method uses the [default environment](https://docs.microsoft.com/power-platform/admin/environments-overview#the-default-environment) for the tenant and deploys to the region of this environment. You can find the region of a deployed app or your tenant's default environment from the [admin center](https://docs.microsoft.com/power-platform/admin/regions-overview#how-do-i-find-out-where-my-app-is-deployed). To review all apps in a specific environment, go to [make.powerapps.com](https://make.powerapps.com), select the **Environment** from the ribbon and then select **Apps** on the left. |
| 67 | + |
| 68 | +## App access to SQL Database |
| 69 | + |
| 70 | +You can configure PowerApps to connect to SQL Database using IP addresses or as an Azure service. |
| 71 | + |
| 72 | +### App access using IP address |
| 73 | + |
| 74 | +[PowerApps system requirements](limits-and-config.md#ip-addresses) lists the IP addresses that PowerApps uses depending on the region of the app. |
| 75 | + |
| 76 | +You can use either a Transact-SQL stored procedure or the Azure portal to configure this access: |
| 77 | + |
| 78 | +- Stored procedure [sp_set_firewall_rule](https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-set-firewall-rule-azure-sql-database?view=azuresqldb-current) for SQL Database or SQL Server level firewall rules. |
| 79 | +- [Azure portal](https://docs.microsoft.com/azure/sql-database/sql-database-firewall-configure) for SQL Server level firewall rules. |
| 80 | + |
| 81 | +### App access as an Azure service |
| 82 | + |
| 83 | +PowerApps can connect to SQL Database **Allow access to Azure services** control using the Azure portal. To configure this access, sign in to the [Azure portal](https://portal.azure.com/) and navigate the portal to **SQL Server**. Select **Firewalls and virtual networks** and set the control **Allow Azure services and resources to access this server** to ON. Select **Save** to submit changes. |
| 84 | + |
| 85 | +> [!IMPORTANT] |
| 86 | +> If you leave the control set to ON, your Azure SQL Database server accepts communication from any subnet inside the Azure boundary i.e. originating from one of the IP addresses that is recognized as those within ranges defined for Azure data centers. Leaving the control set to ON might be excessive access from a security point of view. |
| 87 | +
|
| 88 | +## Limitations |
| 89 | + |
| 90 | +- The app name can only include a letter, digit, '-', '(', ')' or '_'. |
| 91 | +- PowerApps requires SQL authentication to connect to SQL Database. |
| 92 | +- You can select only one table while creating canvas app from the Azure portal. Customize the app after the app is created if you want to add more tables and other data sources by adding more data connections. |
| 93 | +- PowerApps cannot connect to SQL Database using VNet Service Endpoints. For more information, read [allowing access through VNet Service Endpoints](https://docs.microsoft.com/azure/sql-database/sql-database-vnet-service-endpoint-rule-overview). |
| 94 | + |
| 95 | +## Other considerations |
| 96 | + |
| 97 | +- The access of the app to SQL Database is implicitly shared to all users that you [share this app](share-app.md) with. Ensure the SQL authentication credentials have appropriate access for reading and writing data. </br> For example, you can create separate app that connect to the same SQL Database with different SQL authentication credentials to segregate read and read/write access. |
| 98 | +- Review throttling limits, delegatable functions and operations, known issues and limitations of the [SQL Database](https://docs.microsoft.com/connectors/sql/) connector this feature uses for performance considerations. |
| 99 | +- Create an app from [make.powerapps.com](https://make.powerapps.com) when you need to create an app for a non-default environment and a different region for the tenant using data from SQL Database. |
| 100 | + |
| 101 | +## Next steps |
| 102 | + |
| 103 | +In this quickstart, you created an app using data from your SQL Database using the Azure portal. As a next step, customize the app with controls, images and logic to better suit your business needs. |
| 104 | + |
| 105 | +> [!div class="nextstepaction"] |
| 106 | +> [Design the canvas app interface in PowerApps](add-configure-controls.md) |
| 107 | +
|
| 108 | +## See also |
| 109 | + |
| 110 | +- [Share a canvas app in PowerApps](share-app.md) </br> |
| 111 | +- [Add a data connection to a canvas app in PowerApps](add-data-connection.md#add-data-source)</br> |
| 112 | +- [Microsoft Learn: Customize a canvas app in PowerApps](https://docs.microsoft.com/learn/modules/customize-apps-in-powerapps/) |
0 commit comments