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
singhal14
Helper I
Helper I

Power Bi Embedded Row Level Security

Hi everyone,

 

I have been trying to implement row-level security in my power bi embedded report in my web page using this link:https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-iframe , but whenever I add username, role and scp in token 2 the output changes into "The content is'nt available" ,(Without adding these parameters my report works fine ). Any idea what I might be doing wrong?(There is no problem in my RLS rule either)

 

Thanks.

2 REPLIES 2
Eric_Zhang
Employee
Employee

@singhal14

Could you post the code snippet of the RLS token?

In my case, I use below and it works in my test.

 

var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id, Convert.ToDateTime("2017-12-31"),"username",new string[] { "roleName" });

Were you able to resolve the issue singhal?

I am having the same problem, using either one similar to the token in the sample and one with an exipration set as per Eric's.

 

IEnumerable<string> UserRoles = new List<string>() {"provider"};
var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id, "10005", UserRoles);
var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id, Convert.ToDateTime("2017-12-12"), "10005", new string[] { "provider" });

 

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.