cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Embedding with PowerBI

Hi,

On June 12th Microsoft annouced that they are combininng Azure Power BI embedding and  PowerBI Services. Until June 12th we were using Azure services to embed and it was working fine with RLS feature. Now we moved everything to PowerBi Services and we are able to achieve embedding But we are not able to use RLS. In Azure, to create embed token we provide username and role which is used for RLS in pbix but in PowerBi Services, to create embed token it takes in Authentication Code, Group Id and Report ID alone and Embed token is generated by Mircosoft. So I would like to know if there is any way of using RLS method in the PowerBI services to filter the data. We would use URL filter method but it is not as secure as RLS method .

 

Thanks,

Raj

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Embedding with PowerBI


@vickyprudhvi wrote:

Hi @v-jiascu-msft

thank you for your reply.

yes I knoow that RLS works in PowerBi Services but we are using the reports for embedding into an app for NON PowerBI users. So wnat to know if there is a way for RLS to work for Non PowerBI Users too as URL level Filter is not secure


@vickyprudhvi

 

RLS works for the old embedding model(deprecated), for the new model, the RLS feature is on the roadmap and would be released in next quarter. So at this moment, using filter in the Power BI Javascript API can be the only workaround. See a demo below. If RLS is mandotory, you could still use the old embedding model, the old Power BI Embedded service(on azure) will continue to be available for a limited time 

 

<html>

 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
 
<script type="text/javascript">
window.onload = function () { 
var users= ["user1"]; //get the client name with javascript from your page var Filter = { $schema: "http://powerbi.com/product/schema#basic", target: { table: "Table", column: "username" }, operator: "Contains", values: users } // Read embed application token from Model var accessToken = "H4sIAAAAAAAEAB2 xxxxx uCwAA"; // Read embed URL from Model var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=1f1d9145-738a-4d20-ab5b-1236b283e942&groupId=73e1a3c6-08c4-4651-aa04-2bb701a573c7"; // Read report Id from Model var embedReportId = "1f1d9145-738a-4d20-ab5b-1236b283e942"; // Get models. models contains enums that can be used. var models = window['powerbi-client'].models; // Embed configuration used to describe the what and how to embed. // This object is used when calling powerbi.embed. // This also includes settings and options such as filters. // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details. var embedConfiguration = { type: 'report', tokenType: models.TokenType.Embed, accessToken: accessToken, embedUrl: embedUrl, id: embedReportId, permissions: models.Permissions.All, filters:[Filter,Filter2], settings: { filterPaneEnabled: true, navContentPaneEnabled: true } }; var $reportContainer = $('#reportContainer'); var report = powerbi.embed($reportContainer.get(0), embedConfiguration); } </script> <div id="reportContainer" powerbi-settings-nav-content-pane-enabled="true" powerbi-settings-filter-pane-enabled="true"></div> </html>

 

View solution in original post

3 REPLIES 3
Highlighted
Microsoft
Microsoft

Re: Embedding with PowerBI

Hi @vickyprudhvi,

 

You might have seen the message that RLS has been moved to Power BI Desktop. So we can create RLS roles in Power BI Desktop and then publish it to the Service. Finally we add members to a role to make it work.Embedding with PowerBI .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper IV
Helper IV

Re: Embedding with PowerBI

Hi @v-jiascu-msft

thank you for your reply.

yes I knoow that RLS works in PowerBi Services but we are using the reports for embedding into an app for NON PowerBI users. So wnat to know if there is a way for RLS to work for Non PowerBI Users too as URL level Filter is not secure

Highlighted
Microsoft
Microsoft

Re: Embedding with PowerBI


@vickyprudhvi wrote:

Hi @v-jiascu-msft

thank you for your reply.

yes I knoow that RLS works in PowerBi Services but we are using the reports for embedding into an app for NON PowerBI users. So wnat to know if there is a way for RLS to work for Non PowerBI Users too as URL level Filter is not secure


@vickyprudhvi

 

RLS works for the old embedding model(deprecated), for the new model, the RLS feature is on the roadmap and would be released in next quarter. So at this moment, using filter in the Power BI Javascript API can be the only workaround. See a demo below. If RLS is mandotory, you could still use the old embedding model, the old Power BI Embedded service(on azure) will continue to be available for a limited time 

 

<html>

 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
 
<script type="text/javascript">
window.onload = function () { 
var users= ["user1"]; //get the client name with javascript from your page var Filter = { $schema: "http://powerbi.com/product/schema#basic", target: { table: "Table", column: "username" }, operator: "Contains", values: users } // Read embed application token from Model var accessToken = "H4sIAAAAAAAEAB2 xxxxx uCwAA"; // Read embed URL from Model var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=1f1d9145-738a-4d20-ab5b-1236b283e942&groupId=73e1a3c6-08c4-4651-aa04-2bb701a573c7"; // Read report Id from Model var embedReportId = "1f1d9145-738a-4d20-ab5b-1236b283e942"; // Get models. models contains enums that can be used. var models = window['powerbi-client'].models; // Embed configuration used to describe the what and how to embed. // This object is used when calling powerbi.embed. // This also includes settings and options such as filters. // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details. var embedConfiguration = { type: 'report', tokenType: models.TokenType.Embed, accessToken: accessToken, embedUrl: embedUrl, id: embedReportId, permissions: models.Permissions.All, filters:[Filter,Filter2], settings: { filterPaneEnabled: true, navContentPaneEnabled: true } }; var $reportContainer = $('#reportContainer'); var report = powerbi.embed($reportContainer.get(0), embedConfiguration); } </script> <div id="reportContainer" powerbi-settings-nav-content-pane-enabled="true" powerbi-settings-filter-pane-enabled="true"></div> </html>

 

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors