Forum Discussion
Row level security with multiple roles
Hi v-jiascu-msft,
The issue is no yet solved.
I need to get a report as such where client_id = 2 and location_id =1 (Single client may have different locations). When i want to render a report , where the location_id is only 1.
reffer image for the relationship.
So, How i can achive that?
The client and locationid can be dynamic. As 'username' in identities takes only single value where can i pass location_id like just 1?.
How my role level security created at the desktop?
In the above solution, when i create the role as such, i wil get a report for that particular client and all locations under that client. But, in this case i need a single location that is under client, i mean to say that location id and client id is send to the api at the time of embedding in the webapplication.
something like this ?
$clientid = "2";
{
"accessLevel": "View",
"identities": [
{
"username": $clientid ,$location_id
"roles": [ "Client","Location" ],
"datasets": [ "9b61d620-e6ac-41fc-b2c9-3f1d89241a03" ]
}
]
}
If their is something to solve this issue is very helpfull.
Thank you
Pallavi
- PallaviKGVG8 years agoHelper I
Hi, any updates on the above issue:smileysad:
Thank you
Pallavi
- v-jiascu-msft8 years agoMicrosoft Employee
Hi Pallavi,
Do you do this for security? The RLS roles in this scenario are PRE-defined. We just bind them with users. So there isn't something like "client_id = 2 and location_id =1" when we apply RLS. There is only Role1 or Role2. The rules of Role1 is client_id = 2 and location_id =1". If you want some data of where the location_id is only 1, there will be a role, let's call it Role 3, with rules "location_id = 1". Please give it a try.
Best Regards,
Dale
- PallaviKGVG8 years agoHelper I
Thank you Dale,
I understand the solution(The rules of Role1 is client_id = 2 and location_id =1". If you want some data of where the location_id is only 1, there will be a role, let's call it Role 3, with rules "location_id = 1").
But, i cannot hardcode the location id and client id in role(like "location_id = 1" and client_id = 2), where i am embeding the report into web application, i won't be knowing which client and location user logged in to application(Location and client id is dynamic always).
When i logged in to web application and when the reports rendered through power bi rest api, i should be seeing only respective client and respective location report data.
I have rised this question with respect to report embed on webapplication.
Thank you
Pallavi