Forum Discussion
RLS doesn't work with identities from embed token (don't filter the report data)
- 8 years ago
Solved!
The issue was tha bad key in post json: "identitites" instead of "identities".
That bug was difficult to be discovered as the request gave back the correct response with the report token. But in the request body was taken only accessLevel and identities part has been ignored.
did you add this role also on the PBI report side?
you need to create some custom role called for example my_role with parameters
[column from your table with email] = username ()
- jarek_blaszczyk8 years agoRegular Visitor
yes, we did it
- TriPax8 years agoFrequent Visitor
I'm using it at my app so it's look like that on the raport side
Then in the code I'm using
accessLevel: "view", identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "[email protected], roles: new List<string> { DynamicUser }, datasets: new List<string> { somedatasetid }) }
But I'm using .net app so it should be sth like this if we use hardcoded values
"accessLevel": "View", "identities": [ { "username": "[email protected]", "roles": [ "DynamicUser" ], "datasets": [ "somedatasetid" ] } ]
- jarek_blaszczyk8 years agoRegular Visitor
thx, I do it exactly as you wrote (using Spring REST API)