Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gattoun
Frequent Visitor

Tutorial for Power BI Embedded + Azure + SQL Server + RLS

Does anyone know of a start to finish tutorial for creating an Azure app with authentication that includes Power BI Embedded (using DirectQuery SQL server) and row-level security? I've found a few bits and pieces but nothing complete.

 

Thanks!

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@gattoun wrote:

Does anyone know of a start to finish tutorial for creating an Azure app with authentication that includes Power BI Embedded (using DirectQuery SQL server) and row-level security? I've found a few bits and pieces but nothing complete.

 

Thanks!


@gattoun

Power BI Embedded is being deprecated and doesn't support direct query to the sources other than Azure SQL database/datawarehouse. There's a good demo which shows how you can build a Power BI Embedded site.

 

If direct query mode is still preferred, then let's start with an Azure SQL database.

  1. Create a report in Power BI desktop connecting the Azure SQL DB in direct query mode. Save the report as a pbix file.
  2. Import the pbix file to your workspace and update the connection string and crediential with ProvisionSample in the demo.
  3. Embed the reports in your own app, following the EmbedSample in the demo. As to RLS, following this Row level security with Power BI Embedded to generate RLS specific token.
  4. Deploy your application to Azure, see Deploy your app to Azure App Service.

As I mentioned that PBI Embedded is being deprecated, the new replacement is Embedding with non-Power BI users. It is supporting direct query to SQL Server. The steps are a little different.

  1. Create a report in Power BI desktop connecting the SQL Server in direct query mode.
  2. Create a Power BI app workspace and publish the report to the workspace in Power BI desktop.
  3. Install a gateway and configure datasource for the report.
  4. Following this APP OWNS DATA in this demo to embed the report. As to RLS, at this moment this feature is not available in the this replacement and it would come at earliest in next quarter. 
  5. Deploy your application to Azure, see Deploy your app to Azure App Service.

 

 

 

View solution in original post

2 REPLIES 2
Eric_Zhang
Employee
Employee


@gattoun wrote:

Does anyone know of a start to finish tutorial for creating an Azure app with authentication that includes Power BI Embedded (using DirectQuery SQL server) and row-level security? I've found a few bits and pieces but nothing complete.

 

Thanks!


@gattoun

Power BI Embedded is being deprecated and doesn't support direct query to the sources other than Azure SQL database/datawarehouse. There's a good demo which shows how you can build a Power BI Embedded site.

 

If direct query mode is still preferred, then let's start with an Azure SQL database.

  1. Create a report in Power BI desktop connecting the Azure SQL DB in direct query mode. Save the report as a pbix file.
  2. Import the pbix file to your workspace and update the connection string and crediential with ProvisionSample in the demo.
  3. Embed the reports in your own app, following the EmbedSample in the demo. As to RLS, following this Row level security with Power BI Embedded to generate RLS specific token.
  4. Deploy your application to Azure, see Deploy your app to Azure App Service.

As I mentioned that PBI Embedded is being deprecated, the new replacement is Embedding with non-Power BI users. It is supporting direct query to SQL Server. The steps are a little different.

  1. Create a report in Power BI desktop connecting the SQL Server in direct query mode.
  2. Create a Power BI app workspace and publish the report to the workspace in Power BI desktop.
  3. Install a gateway and configure datasource for the report.
  4. Following this APP OWNS DATA in this demo to embed the report. As to RLS, at this moment this feature is not available in the this replacement and it would come at earliest in next quarter. 
  5. Deploy your application to Azure, see Deploy your app to Azure App Service.

 

 

 

Hi Eric,

 

I hate to hi-jack this question, but this scenario is very similiar to ours.  The primary difference is we are reporting off of a MySQL database and obviously not using DirectQuery, since it isn't supported.

 

I have got the APP OWNS DATA project to work for us, but wanted to add RLS.  I didn't see a way to add the username and role to the token as described here, because as far as I can see, PowerBIToken is not referenced in the APP OWNS DATA sample.

 

Am I understanding you correctly, that even in my scenario, RLS cannot be implemented in the APP OWNS DATA sample?

 

thank you!

David

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.