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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
Microsoft Employee
Microsoft 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
Microsoft Employee
Microsoft 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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