{"id":38221,"date":"2020-01-14T06:00:11","date_gmt":"2020-01-14T13:00:11","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/premier-developer\/?p=38221"},"modified":"2020-01-07T20:06:13","modified_gmt":"2020-01-08T03:06:13","slug":"secure-access-to-azure-sql-servers-for-power-bi","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/secure-access-to-azure-sql-servers-for-power-bi\/","title":{"rendered":"Secure Access to Azure SQL Servers for Power BI"},"content":{"rendered":"<p>Premier Developer Consultant <a href=\"https:\/\/www.linkedin.com\/in\/jean-hayes-9a50b05\/\">Jean Hayes<\/a> outlines a strategy for controlling access to Azure SQL Servers used by Power BI.<\/p>\n<hr \/>\n<p>When provisioning an Azure SQL Server for Azure SQL DB or Azure Synapse Analytics (formerly known as Azure SQL Data Warehouse), organizations can allow all or no access from other Azure resources. This configuration setting is available on the <strong>Firewall and virtual networks<\/strong> settings on the Azure SQL server:<\/p>\n<p><img decoding=\"async\" width=\"1794\" height=\"545\" class=\"wp-image-38222\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/word-image-19.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/word-image-19.png 1794w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/word-image-19-300x91.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/word-image-19-1024x311.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/word-image-19-768x233.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/word-image-19-1536x467.png 1536w\" sizes=\"(max-width: 1794px) 100vw, 1794px\" \/><\/p>\n<p>When using Azure SQL DB or Azure Synapse as a Power BI data source, configuring this setting to \u201cON\u201d allows the Power BI service to refresh data from the server\u2019s databases without configuring a gateway. However, it allows traffic from all Azure resources and services to your database(s), not just resources in your Azure subscription. Database credentials restrict access to your databases, but the inability to restrict traffic to only your Azure resources may not be acceptable to some organizations.<\/p>\n<p>So how do you refresh Power BI datasets in the Power BI service from Azure SQL server resources while restricting traffic to specific resources? By using the On-Premises Data Gateway and SQL endpoints. This allows you to lock down traffic to Azure SQL resources by setting \u201cAllow Azure services and resources to access this server\u201d to OFF, and use the gateway to provide secure access between Power BI and Azure SQL database. This is similar to the way you would provide Power BI access to on-premises SQL Server instances.<\/p>\n<p>This requires the ability to create and configure a VM in Azure and to configure data gateways in the Power BI service.<\/p>\n<p><img decoding=\"async\" width=\"1244\" height=\"1574\" class=\"wp-image-38223\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati.jpeg\" alt=\"A screenshot of a cell phone Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati.jpeg 1244w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-237x300.jpeg 237w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-809x1024.jpeg 809w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-768x972.jpeg 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-1214x1536.jpeg 1214w\" sizes=\"(max-width: 1244px) 100vw, 1244px\" \/><\/p>\n<p>The steps involved are:<\/p>\n<ol>\n<li>Provisioning the VM in a VNet. See <a href=\"https:\/\/docs.microsoft.com\/data-integration\/gateway\/service-gateway-install#requirements\">recommendations and requirements for the gateway server.<\/a><\/li>\n<li>Adding a <a href=\"https:\/\/docs.microsoft.com\/azure\/sql-database\/sql-database-vnet-service-endpoint-rule-overview\">Service endpoint<\/a> on your VNet for SQL Server<\/li>\n<\/ol>\n<p><img decoding=\"async\" width=\"1481\" height=\"618\" class=\"wp-image-38224\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati.png\" alt=\"A screenshot of a cell phone Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati.png 1481w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-300x125.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-1024x427.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-768x320.png 768w\" sizes=\"(max-width: 1481px) 100vw, 1481px\" \/><\/p>\n<ol start=\"3\">\n<li>Adding an Outbound Rule on the Network Security Group to allow outbound traffic to the Power BI Service. The allowed destination port ranges are 443, 5671, 5672, and 9350-9354.<\/li>\n<\/ol>\n<p><img decoding=\"async\" width=\"1758\" height=\"636\" class=\"wp-image-38225\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-computer-description-automatica.png\" alt=\"A screenshot of a computer Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-computer-description-automatica.png 1758w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-computer-description-automatica-300x109.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-computer-description-automatica-1024x370.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-computer-description-automatica-768x278.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-computer-description-automatica-1536x556.png 1536w\" sizes=\"(max-width: 1758px) 100vw, 1758px\" \/><\/p>\n<p><img decoding=\"async\" width=\"434\" height=\"522\" class=\"wp-image-38226\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-1.png\" alt=\"A screenshot of a cell phone Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-1.png 434w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-screenshot-of-a-cell-phone-description-automati-1-249x300.png 249w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/p>\n<p><img decoding=\"async\" width=\"1682\" height=\"286\" class=\"wp-image-38227\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-picture-containing-screenshot-description-autom.png\" alt=\"A picture containing screenshot Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-picture-containing-screenshot-description-autom.png 1682w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-picture-containing-screenshot-description-autom-300x51.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-picture-containing-screenshot-description-autom-1024x174.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-picture-containing-screenshot-description-autom-768x131.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/01\/a-picture-containing-screenshot-description-autom-1536x261.png 1536w\" sizes=\"(max-width: 1682px) 100vw, 1682px\" \/><\/p>\n<ol start=\"4\">\n<li><a href=\"https:\/\/docs.microsoft.com\/power-bi\/service-gateway-onprem\">Installing the On-Premises Gateway on the VM<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/power-bi\/service-gateway-enterprise-manage-sql\">Configuring the gateway in the Power BI Service<\/a> as you would for an on-premises SQL Server instance.<\/li>\n<\/ol>\n<p>And that\u2019s it! You can now access your Azure SQL server resources to Power BI while limiting traffic to other Azure resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you refresh Power BI datasets in the Power BI service from Azure SQL server resources while restricting traffic to specific resources? Learn how using the On-Premises Data Gateway and SQL endpoints can help you tighten security.<\/p>\n","protected":false},"author":582,"featured_media":37933,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25,8,1],"tags":[24,3],"class_list":["post-38221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-data","category-permierdev","tag-azure","tag-team"],"acf":[],"blog_post_summary":"<p>How do you refresh Power BI datasets in the Power BI service from Azure SQL server resources while restricting traffic to specific resources? Learn how using the On-Premises Data Gateway and SQL endpoints can help you tighten security.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=38221"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38221\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37933"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=38221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=38221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=38221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}