Forum Discussion
Power BI Embedded Row-Level Security for Multiple values of single attribute
I have one table where I have to check two roles. One is "TenantID" and User Level. Can you please help with this.
TenantID = username() && User Level = username()
Above this, I set the roles?
Report should be filtered via Tenant and then user level role.
Please let me know how to call this role in embedded code
var generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "username", roles: new List<string> { "roleA", "roleB" }, datasets: new List<string> { "datasetId" }) });
var tokenResponse = await client.Reports.GenerateTokenInGroupAsync("groupId", "reportId", generateTokenRequestParameters);
or
{ "accessLevel": "View", "identities": [ { "username": "EffectiveIdentity", "roles": [ "Role1", "Role2" ], "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ] } ] }
Hello Mayank,
You can probably, create a computed column which is a combination of TenantId & User Level. Once this is done, you can then pass appropriate value in the UserName(), which can then be used to apply the rule on the newly created computed column.
Hope, this helps!