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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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