Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
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" });